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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Junio C Hamano" <gitster@xxxxxxxxx>
Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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?


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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]