git-annex/Git
Joey Hess b191d5c595 gitignore support for the assistant and watcher
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!
2013-08-02 20:37:03 -04:00
..
AutoCorrect.hs finished where indentation changes 2012-12-13 00:24:19 -04:00
Branch.hs XMPP: Avoid redundant and unncessary pushes. Note that this breaks compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version. 2013-05-21 18:24:29 -04:00
BuildVersion.hs better git version checking 2013-08-02 18:32:26 -04:00
CatFile.hs Slow and ugly work around for bug #718517 in git, which broke git-cat-file --batch for filenames containing spaces. 2013-08-01 17:30:47 -04:00
CheckAttr.hs better git version checking 2013-08-02 18:32:26 -04:00
CheckIgnore.hs gitignore support for the assistant and watcher 2013-08-02 20:37:03 -04:00
Command.hs avoid newline translation when writing to git hash-object 2013-06-18 15:08:51 -04:00
Config.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Construct.hs get rid of __WINDOWS__, use mingw32_HOST_OS 2013-08-02 12:27:32 -04:00
CurrentRepo.hs get rid of __WINDOWS__, use mingw32_HOST_OS 2013-08-02 12:27:32 -04:00
DiffTree.hs XMPP: Avoid redundant and unncessary pushes. Note that this breaks compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version. 2013-05-21 18:24:29 -04:00
Filename.hs handle C-style escapes in Format 2011-12-23 01:05:16 -04:00
FilePath.hs get rid of __WINDOWS__, use mingw32_HOST_OS 2013-08-02 12:27:32 -04:00
HashObject.hs missed another hash-object call, disable filtering there too 2013-06-18 14:48:15 -04:00
Index.hs clean up from windows porting 2013-05-11 18:23:41 -04:00
LsFiles.hs importfeed: git-annex becomes a podcatcher in 150 LOC 2013-07-28 16:55:42 -04:00
LsTree.hs assistant: The ConfigMonitor left one zombie behind each time it checked for changes, now fixed. 2013-03-18 22:09:51 -04:00
Merge.hs better git version checking 2013-08-02 18:32:26 -04:00
Queue.hs Escape ':' in file/directory names to avoid it being treated as a pathspec by some git commands 2013-08-01 15:15:49 -04:00
Ref.hs include HEAD in CanPush shas 2013-05-21 20:04:38 -04:00
Remote.hs webapp: Generate better git remote names. 2012-10-31 15:26:19 -04:00
Sha.hs whitespace fixes 2012-12-13 00:45:27 -04:00
SharedRepository.hs Support git's core.sharedRepository configuration 2012-04-21 15:36:52 -04:00
Types.hs XMPP: Avoid redundant and unncessary pushes. Note that this breaks compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version. 2013-05-21 18:24:29 -04:00
UnionMerge.hs union merge bugfix 2013-01-16 21:31:06 -04:00
UpdateIndex.hs Revert "flush stream after each write to update-index, to possibly avoid buffering issues on Windows" 2013-06-14 14:34:24 -04:00
Url.hs finished where indentation changes 2012-12-13 00:24:19 -04:00
Version.hs better git version checking 2013-08-02 18:32:26 -04:00