Re: [PATCH/GSoC] add a add.patch config variable

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

 



Am 24.03.2016 um 22:20 schrieb Junio C Hamano:
XZS <d.f.fischer@xxxxxx> writes:
Users may like to review their changes when staging by default. It is
also a convenient safety feature for beginners nudging them to have a
second look at their changes when composing a commit.

To this end, the config variable allows to have git-add to always act
like -p was passed.

Now with such a configuration in her ~/.gitconfig, how would she
ever run the normal "git add", which perhaps is invoked by one of
the scripts she regularly uses?  E.g. "git mergetool"?

As the configuration variable can be overwritten by a command line option, I am tempted to amend this by replacing all occurrences of "git add" in other scripts with "git add --no-patch" to ensure the expected behavior.

But this would introduce changes into a vast number of points in the code. Apart from that, I suspect other options may have the same reason not to be available as config variables. It would be much better if git-add could ignore the variable when called internally, only taking it into account when used as an entrypoint.

Is there already a mechanism in place to determine if git was called by git? If not, I could implement one through an environment variable that counts up on each git invocation, essentially providing a git recursion counter.
--
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]