Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 0/2] git-add: -s flag (silently ignore files)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:54

Olaf Klischat [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help