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

Re: [PATCH RFC 1/3] add: add new --exclude option to git add

From
Philip Oakley <philipoakley@iee.org>
Date
Mar 15, 2015, 20:45 UTC
Message-ID
<D9562ECC995343B3A51D449DC2B46CBC@PhilipOakley>
In-Reply-To
<xmqqtwxmt43h.fsf@gitster.dls.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 9 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> The commit message is missing the important justification for why 
>> this
>> new option is desirable, and why only git-add needs it.
>
> I think that is a very good point.  I actually do not see why this
> option is ever needed, in a modern world that has the negative
> pathspec magic.

Isn't the problem one of "how are users to discover such magic". The fact we call it 'magic' (a sleight of hand...) may be why Alexander felt the need for the extra option.

Maybe He/We would be better off adjusting the documentation such that these 'magic' capabilities are brought out of their hiding places into regular view - e.g. a paragraph within the 'git add' documentation (and/or other commands) showing how such excludes are easily done with a few simple keystrokes....

'git help revisions' doesn't appear to cover it. I'm not sure we even mention "negative pathspec" in the documentation (apart from rel notes 1.9.0 & 2.3.0).

Maybe Alexander could change itch to: make the "magic negative pathspec" capability more visible?

Show 11 quoted lines
>
> Is there a reason why this is undesiable
>
>    $ git add -- \*.c ':!secret.c'
>
> and has to be spelled as
>
>    $ git add --exclude=secret.c -- \*.c
>
> I do not see why...
> --
Philip 
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “add: add new --exclude option to git add”
  1. 1/3 add: add new --exclude option to git addAlexander Kuleshov, Mar 15, 2015
  2. 2/3 Documentation/git-add.txt: describe --exclude optionAlexander Kuleshov, Mar 15, 2015
  3. Eric SunshineMar 15, 2015
  4. 3/3 t3700-add: added test for --exclude optionAlexander Kuleshov, Mar 15, 2015
  5. Torsten BögershausenMar 15, 2015
  6. Eric SunshineMar 15, 2015
  7. Philip OakleyMar 15, 2015
  8. Torsten BögershausenMar 15, 2015
  9. Alexander KuleshovMar 15, 2015
  10. Torsten BögershausenMar 16, 2015
  11. Torsten BögershausenMar 15, 2015
  12. Eric SunshineMar 15, 2015
  13. Junio C HamanoMar 15, 2015
  14. Philip OakleyMar 15, 2015
  15. Junio C HamanoMar 15, 2015
  16. Alexander KuleshovMar 16, 2015

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.