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

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

From
Olaf Klischat <olaf.klischat@gmail.com>
Date
Oct 1, 2012, 07:14 UTC
Message-ID
<1349075700-26334-1-git-send-email-olaf.klischat@gmail.com>

This adds an -s|--silent-ignore option to git-add, which causes ignored files that were specified explicitly on the command line to be silently ignored, rather than abandoning the command. I found this useful for 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 so they don't output any ignored files. git ls-files doesn't have find's filtering capabilities, and using it in place of find would kind of violate "one job one tool" anyway. I'm not really a git guru, so maybe I'm missing something, and I'm unsure how useful this new option is for a general audience. OTOH the patch is trivial. Check it out.

The update applies on top of "master" (261b5119).
Olaf Klischat (2):
  git-add: -s flag added (silently ignore files)
  git-add: -s flag: documentation added
 Documentation/git-add.txt |   15 +++++++++++----
 builtin/add.c             |   14 +++++++++++---
 t/t3700-add.sh            |   17 ++++++++++++++++-
 3 files changed, 38 insertions(+), 8 deletions(-)
-- 
1.7.10.4
Next: Olaf Klischat
Message 1 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.