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 19, 2012, 18:46 UTC
Message-ID
<7v8vl3jzst.fsf@alter.siamese.dyndns.org>
In-Reply-To
<8762g87y4q.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 18 quoted lines
> [dropped Dieter as this really goes off on an internal tangent]
>
> Junio C Hamano <gitster@pobox.com> writes:
>
>> If somebody is writing a script using "git add" (which is not recommended
>> to begin with)
>
> Can we still stick to that stance?  Our tests are increasingly using
> 'git add' instead of 'git update-index --add':
>
>   $ git grep 'git[ -]add' t/ | wc -l
>   1540
>   $ git grep 'git[ -]update-index --add' t/ | wc -l
>   269
>   $ git grep 'git[ -]update-index --add' v1.6.0 t/ | wc -l
>   251
>   $ git grep 'git[ -]add' v1.6.0 t/ | wc -l
>   705
Stop being silly.

Have you actually looked at these usage? Some of them are genuinely testing if "git add" works correctly, so it is out of the scope of this discussion, but others that could be "git update-index" are feeding the paths known to the script to exist (and we want 'git add' to error out if that is not the case).

More generally, scripts in t/ directories are "scripts", but it is totally different from the kind of "user facing script that behaves as if it is a complete command, taking its own command line arguments, passing them through to the underlying plumbing commands".

Previous: Thomas RastNext: Thomas Rast
Message 7 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.