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

Re: [PATCH] git-add: allow --ignore-missing always, not just in dry run

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 18, 2012, 22:56 UTC
Message-ID
<7vobu0liwj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1326923544-8287-1-git-send-email-dieter@plaetinck.be>
Dieter Plaetinck <dieter@plaetinck.be> writes:
Show 5 quoted lines
> There is no need to restrict use of --ignore-missing to dry runs,
> it can be useful to ignore missing files during normal operation as
> well.
>
> Signed-off-by: Dieter Plaetinck <dieter@plaetinck.be>

Sorry, but for this kind of change, we would want to see a justification that is much better than that. The default around here is not to change an established behaviour without a good reason.

Have you dug into the list archive to see _why_ we decided not to allow this option in the real run in the first place? You would need to find "By letting the command ignore missing paths, the user can get into X and Y situations and we would want to avoid it. We however need to give users a way to see if there is something missing, hence we add it when we are under dry-run option." and refute that previous justification, arguing why X and Y is something we should _not_ be worrying about, to make a good case for this change.

In this particular case, my gut feeling is that this might a change in the good direction (but I strongly suspect that I am not recalling the real reason why we didn't allow it when we introduced this option).

If somebody is writing a script using "git add" (which is not recommended to begin with), it is tempting to say 'git add $list_of_possible_files' in such a script when the script _knows_ that the list it is giving to "git add" may contain a path that does not exist, and wants to ignore missing ones.

But then the script could easily filter what does not exist before compiling such a list, so that is not a very strong reason to advocate it.

Previous: Dieter PlaetinckNext: Dieter Plaetinck
Message 2 of 10 in “git-add: allow --ignore-missing always, not just in dry run”
  1. git-add: allow --ignore-missing always, not just in dry runDieter Plaetinck, Jan 18, 2012
  2. Junio C HamanoJan 18, 2012
  3. Dieter PlaetinckJan 19, 2012
  4. Junio C HamanoJan 19, 2012
  5. Dieter PlaetinckJan 20, 2012
  6. Thomas RastJan 19, 2012
  7. Junio C HamanoJan 19, 2012
  8. Thomas RastJan 20, 2012
  9. Junio C HamanoJan 20, 2012
  10. Mike GantFeb 7, 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.