git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 1, 2012, 18:32 UTC
Message-ID
<7v8vbqcacc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1349075700-26334-1-git-send-email-olaf.klischat@gmail.com>
Olaf Klischat <olaf.klischat@gmail.com> 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.
Previous: Olaf Klischat
Message 6 of 6 in “git-add: -s flag (silently ignore files)”
  1. 0/2 git-add: -s flag (silently ignore files)Olaf Klischat, Oct 1, 2012
  2. 1/2 git-add: -s flag added (silently ignore files)Olaf Klischat, Oct 1, 2012
  3. Junio C HamanoOct 1, 2012
  4. Matthieu MoyOct 1, 2012
  5. 2/2 git-add: -s flag: documentation addedOlaf Klischat, Oct 1, 2012
  6. Junio C HamanoOct 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.