git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominik Fischer <d.f.fischer@web.de>
To: git@vger.kernel.org
Subject: Re: [PATCH/GSoC] add a add.patch config variable
Date: Fri, 25 Mar 2016 01:43:47 +0100	[thread overview]
Message-ID: <56F489C3.9050400@web.de> (raw)
In-Reply-To: <xmqqvb4b7eu9.fsf@gitster.mtv.corp.google.com>

Am 24.03.2016 um 22:20 schrieb Junio C Hamano:
> XZS <d.f.fischer@web.de> 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.

  reply	other threads:[~2016-03-25  0:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 21:09 [GSoC] Proposal XZS
2016-03-24 21:09 ` [PATCH/GSoC] add a add.patch config variable XZS
2016-03-24 21:20   ` Junio C Hamano
2016-03-25  0:43     ` Dominik Fischer [this message]
2016-03-25  6:30       ` Junio C Hamano
2016-03-25  7:01   ` Christian Couder
2016-04-21  9:15     ` [PATCH/RFC/GSoC 0/2] " XZS
2016-04-21  9:15       ` [PATCH/RFC/GSoC 1/2] count recursion depth XZS
2016-04-21 15:39       ` [PATCH/RFC/GSoC 0/2] add a add.patch config variable Johannes Schindelin
2016-04-21 16:30         ` Dominik Fischer
2016-04-21 16:43           ` Matthieu Moy
2016-04-21 16:47             ` Junio C Hamano
2016-04-21 17:28               ` Dominik Fischer
2016-04-22  6:45                 ` Johannes Schindelin
2016-04-22  6:42           ` Johannes Schindelin
2016-04-21  9:15     ` [PATCH/RFC/GSoC 2/2] " XZS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F489C3.9050400@web.de \
    --to=d.f.fischer@web.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).