From: Junio C Hamano Date: Mon, 01 Oct 2012 18:32:03 GMT Subject: Re: [PATCH 0/2] git-add: -s flag (silently ignore files) Message-ID: <7v8vbqcacc.fsf@alter.siamese.dyndns.org> In-Reply-To: <1349075700-26334-1-git-send-email-olaf.klischat@gmail.com> Olaf Klischat writes: > ... scenarios where you want to feed the file list into git add > via find or other external commands (`find .... | xargs git add'), > which you wouldn't want to carefully tune... Can you explain this kind of thing in the actual commit log message when you reroll (if you will do so)? I also cannot help but find that `scenario` an artificially made-up one. The description did not feel convincing enough, even if it were in the proposed commit log message, to justify such an option. A few questions. - What were the kind of patterns useful in the above `find` in your real life example? - The use of `find` means giving pathspecs from the command line, e.g. "git add foo/ \*.rb", wouldn't have been sufficient. Are there something we could improve this in more direct way? - Why was it too cumbersome to add the idiomatic \( -name '*.o' -o -name '*~' \) -prune -o or something like that in front of whatever patterns were used? - Perhaps a filter that takes a list of paths and emits only the ignored paths (or only the unignored paths) would be a more generic approach? You could feed the output from `find` to such a filter, and then drive not just "git add" but other commands that take paths if you solved it that way.