aboutsummaryrefslogtreecommitdiff
path: root/Git/CurrentRepo.hs
Commit message (Collapse)AuthorAge
* finally really add back custom-setup stanzaGravatar Joey Hess2017-12-31
| | | | | | | | | | | | Fourth or fifth try at this and finally found a way to make it work. Absurd amount of busy-work forced on me by change in cabal's behavior. Split up Utility modules that need posix stuff out of ones used by Setup. Various other hacks around inability for Setup to use anything that ifdefs a use of unix. Probably lost a full day of my life to this. This is how build systems make their users hate them. Just saying.
* Revert "git-annex.cabal: Add back custom-setup stanza, so cabal new-build ↵Gravatar Joey Hess2017-12-31
| | | | | | | | | | | works." This reverts commit c7c745d28868c8cd646d3e31dd8ba6a0b763f611. No, still doesn't work when built with cabal. It did with stack; stack must somehow make the unix package implicitly available. With cabal, System.Posix.Process and System.Posix.Env are both missing.
* git-annex.cabal: Add back custom-setup stanza, so cabal new-build works.Gravatar Joey Hess2017-12-31
| | | | | | | | Seems I had all the work in past commits to make this build, at least on linux. I'm actually surprised it does, without a unix dep, Utility.Env still builds ok somehow despite using System.Posix.Env. This commit was sponsored by Fernando Jimenez on Patreon.
* still can't express custom-setup depsGravatar Joey Hess2017-11-14
| | | | | | | | They need unix on non-windows, for Utility.Env, which Build.Configure uses, but cabal can't express that in a custom-setup stanza. To avoid this problem, Utility.Env would need to be moved into unix-compat..
* split out setEnv to avoid adding depGravatar Joey Hess2017-11-14
| | | | | | | | | | | Windows needs the setenv package in custom-setup, but I don't want to pull it in on unix, which would probably break some builds and need more work. Instead, split out setEnv to a separate module. Quite likely, unix-compat will get a portable environment layer, and then both modules can be removed from here. This commit was sponsored by Øyvind Andersen Holm.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* avoid unncessary IOGravatar Joey Hess2015-02-12
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* Use haskell setenv library to clean up several ugly workarounds for ↵Gravatar Joey Hess2014-10-15
| | | | | | | | | inability to manipulate the environment on windows. Didn't know that this library existed! This includes making git-annex not re-exec itself on start on windows, and making the test suite on Windows run tests without forking.
* export CreateProcess fields from Utility.ProcessGravatar Joey Hess2014-06-10
| | | | update code to avoid cwd and env redefinition warnings
* avoid more build warnings on WindowsGravatar Joey Hess2013-08-04
|
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* use setCurrentDirectoryGravatar Joey Hess2013-05-11
| | | | On POSIX, this just calls changeWorkingDirectory.
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out POSIX stuffGravatar Joey Hess2013-05-10
|
* Additional GIT_DIR support bugfixes. May actually work now.Gravatar Joey Hess2013-02-23
| | | | | | | | | | | | | | | | | | | Two fixes. First, and most importantly, relax the isLinkToAnnex check to only look for /annex/objects/, not [^|/].git/annex/objects. If GIT_DIR is used with a detached work tree, the git directory is not necessarily named .git. There are important caveats with doing that at all, since git-annex will make symlinks that point at GIT_DIR, which means that the relative path between GIT_DIR and GIT_WORK_TREE needs to remain stable across all clones of the repository. ---- The other fix is just fixing crazy and wrong code that, when GIT_DIR is set, expects to still find a git repository in the path below the work tree, and uses some of its configuration, and some of GIT_DIR. What was I thinking, and why can't I seem to get this code right?
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* Fix handling of GIT_DIR when it refers to a git submodule.Gravatar Joey Hess2012-10-17
| | | | | | The old code was just wrong in taking fromPath of GIT_DIR -- that made an localUnknown location with the GIT_DIR in it, which only worked by accident, and failed in submodules.
* ensure that gitdir is absoluteGravatar Joey Hess2012-10-16
| | | | | | | | calcGitLink turns out to need it to be absolute, and it normally is, but not if it's read from a .git file in a submodule, or perhaps from GIT_DIR. I should look into dropping this invariant.
* A relative core.worktree is relative to the gitdir.Gravatar Joey Hess2012-10-16
| | | | | | | | Now that this is handled correctly, git-annex can be used in git submodules. Also, fixed infelicity where Git.CurrentRepo and Git.Config.updateLocation were both dealing with core.worktree. Now updateLocation handles it for Local as well as for LocalUnknown repos.
* simplifyGravatar Joey Hess2012-10-15
|
* more worktree improvementsGravatar Joey Hess2012-05-19
| | | | | | | | | Avoid more expensive code path when no core.worktree is configured. Don't change worktree when reading config if one is already set. This could happen if GIT_CORE_WORKTREE is set, and the repo also has core.worktree, and the config is reread. Now GIT_CORE_WORKTREE will prevail.
* avoid chdir when already inside worktreeGravatar Joey Hess2012-05-19
|
* make GIT_DIR, GIT_WORK_TREE absoluteGravatar Joey Hess2012-05-18
| | | | | GIT_DIR is set to something relative, like ".git" in the pre-commit hook. But internally all the directories are assumed to be absolute.
* Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.Gravatar Joey Hess2012-05-18
The environment needs to override git-config. Changed when git config is read, and avoid rereading it once it's been read. chdir for both worktree settings.