git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: "git pull" doesn't know "--edit"
Date: Sun, 12 Feb 2012 01:59:00 -0800	[thread overview]
Message-ID: <7vlio8l6e3.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CA+55aFwLqvVyMipun4DM4CnbO97Dota3LCM2VPFfLq1LS5a4aQ@mail.gmail.com> (Linus Torvalds's message of "Sat, 11 Feb 2012 12:07:40 -0800")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> In the docs, the "GIT_MERGE_AUTOEDIT=no" thing is mentioned as the way
> to get the legacy behavior, which (at least to me) implies that
> setting it to "yes" gets the modern behavior.

Honestly, I didn't actually intend to accept any value other than "no" to
be set in that variable.

Also the variable's name was way suboptimal.

I didn't intend "Auto" to describe "Edit" (as in "is the editor spawned
AUTO-matically? yes/no"), but meant it to describe "Merge" (as in "When a
merge results in AUTO-committing, do we edit it? yes/no?").

> Maybe this is intentional, and not a bug? But it does seem a bit odd -
> the name is "AUTOEDIT", not "FORCEDEDIT".

A clean merge that tries to start an editor even when not interactive is
honoring the "yes" setting is understandable/explainable if you read the
misnamed variable as "When a merge results in AUTO-committing, do we edit
it? yes/no?"

But it of course does not mean that such a behaviour is useful.  It is not
just "a bit odd", it is outright useless in a text terminal, especially
when you are redirecting the input from /dev/null ;-).

> Or maybe the thing could extend the notion of the current boolean to
> be a tri-state instead: in addition to the traditional true/yes/on and
> false/no/off have a "force" mode that is that "always force it on
> regardless".

Yeah, if we support any value other than "no", I think the trivalue
always/auto/never (aka yes/auto/no) would make the most sense.

> And maybe this is just a "nobody cares" situation - "Don't do that then".

I would have agreed with you 3 years ago, but these days I find the end
users are being much pickier than they used to be ;-).

      reply	other threads:[~2012-02-12  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-11 18:21 "git pull" doesn't know "--edit" Linus Torvalds
2012-02-11 20:07 ` Linus Torvalds
2012-02-12  9:59   ` Junio C Hamano [this message]

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=7vlio8l6e3.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).