aboutsummaryrefslogtreecommitdiff
path: root/Git/CheckIgnore.hs
Commit message (Collapse)AuthorAge
* restart coprocess in raw modeGravatar Joey Hess2016-11-01
| | | | | | | | | | | Restarting a crashing git process could result in filename encoding issues when not in a unicode locale, as the restarted processes's handles were not read in raw mode. Since rawMode is always used when starting a coprocess, didn't bother to parameterise it and just always enable it for simplicity. This commit was sponsored by Jake Vosloo on Patreon.
* work around git check-ignore --batch bad exit status bug, and bring back ↵Gravatar Joey Hess2015-11-06
| | | | import -J
* remove Params constructor from Utility.SafeCommandGravatar Joey Hess2015-06-01
| | | | | | | | | | | | | | | | | | This removes a bit of complexity, and should make things faster (avoids tokenizing Params string), and probably involve less garbage collection. In a few places, it was useful to use Params to avoid needing a list, but that is easily avoided. Problems noticed while doing this conversion: * Some uses of Params "oneword" which was entirely unnecessary overhead. * A few places that built up a list of parameters with ++ and then used Params to split it! Test suite passes.
* This fixes a bug in the assistant introduced by the literal pathspec changes ↵Gravatar Joey Hess2015-04-09
| | | | | | | | | | | in version 5.20150406. git-checkignore refuses to work if any pathspec options are set. Urgh. I audited the rest of git, and no other commands used by git-annex have such limitations. Indeed, AFAICS, *all* other commands support --literal-pathspecs. So, worked around this where git-checkignore is called.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* gitignore support for the assistant and watcherGravatar Joey Hess2013-08-02
Requires git 1.8.4 or newer. When it's installed, a background git check-ignore process is run, and used to efficiently check ignores whenever a new file is added. Thanks to Adam Spiers, for getting the necessary support into git for this. A complication is what to do about files that are gitignored but have been checked into git anyway. git commands assume the ignore has been overridden in this case, and not need any more overriding to commit a changed version. However, for the assistant to do the same, it would have to run git ls-files to check if the ignored file is in git. This is somewhat expensive. Or it could use the running git-cat-file process to query the file that way, but that requires transferring the whole file content over a pipe, so it can be quite expensive too, for files that are not git-annex symlinks. Now imagine if the user knows that a file or directory tree will be getting frequent changes, and doesn't want the assistant to sync it, so gitignores it. The assistant could overload the system with repeated ls-files checks! So, I've decided that the assistant will not automatically commit changes to files that are gitignored. This is a tradeoff. Hopefully it won't be a problem to adjust .gitignore settings to not ignore files you want the assistant to autocommit, or to manually git annex add files that are listed in .gitignore. (This could be revisited if git-annex gets access to an interface to check the content of the index w/o forking a git command. This could be libgit2, or perhaps a separate git cat-file --batch-check process, so it wouldn't need to ship over the whole file content.) This commit was sponsored by Francois Marier. Thanks!