aboutsummaryrefslogtreecommitdiff
path: root/Annex/Environment.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.
* also avoid crashing in most circumstances if unable to determine the usernameGravatar Joey Hess2016-06-08
| | | | | | | | Mostly the username is only used for the git committer or other display purposes, and we can just fall back to a dummy value in these cases. The only remaining place where an error is thrown is when starting local pairing, which needs the username to be known.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* Windows: Fix crash when user.name is not set in git config.Gravatar Joey Hess2014-10-31
|
* fix windows buildGravatar Joey Hess2014-10-16
|
* 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.
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* unify exception handling into Utility.ExceptionGravatar Joey Hess2014-08-07
| | | | | | | | | | | | | | | | | | | | Removed old extensible-exceptions, only needed for very old ghc. Made webdav use Utility.Exception, to work after some changes in DAV's exception handling. Removed Annex.Exception. Mostly this was trivial, but note that tryAnnex is replaced with tryNonAsync and catchAnnex replaced with catchNonAsync. In theory that could be a behavior change, since the former caught all exceptions, and the latter don't catch async exceptions. However, in practice, nothing in the Annex monad uses async exceptions. Grepping for throwTo and killThread only find stuff in the assistant, which does not seem related. Command.Add.undo is changed to accept a SomeException, and things that use it for rollback now catch non-async exceptions, rather than only IOExceptions.
* When init detects that git is not configured to commit, and sets user.email ↵Gravatar Joey Hess2014-04-20
| | | | | | | to work around the problem, also make it set user.name. I was able to reproduce git failing to commit despite user.email being set, in a test account on my laptop. The account had no GECOS information.
* hlintGravatar Joey Hess2013-09-25
| | | | test suite still passes
* 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.
* detect system with no dot in FQDN, where git commit will fail, and workaroundGravatar Joey Hess2013-07-05
| | | | | Sigh, git is so *fragile*. Or rather, across the set of systems that use git-annex, where are no many horribly broken systems..
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* 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
|
* work around git/environment/gecos/android suckGravatar Joey Hess2013-05-03
| | | | | | | I don't know why, but I can't seem to set the environment variables inside git-annex to work around the git error caused by android's crappy username and hostname settings. This workaround works, and that's all that's good about it.
* set EMAIL when GECOS workaround is neededGravatar Joey Hess2013-05-03
| | | | | | | | | Git fails on Android, because it gets some weird domain for local host like "localhost.(none)". This works around that. I made it always set EMAIL when GECOS workaround was needed (unless EMAIL is already set). It might be nicer to try to get the hostname.domain as git does, and only set it if that fails. But I don't want to be stuck trying to exactly duplicate whatever git is doing.
* Detect systems that have no user name set in GECOS, and also don't have ↵Gravatar Joey Hess2013-04-22
user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration.