From: Jonathan Nieder <jrnieder@gmail.com>
To: "Guido Günther" <agx@sigxcpu.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: git merge <tag>: Spawning an editor can't be disabled
Date: Thu, 9 Feb 2012 10:08:18 -0600 [thread overview]
Message-ID: <20120209160803.GA5742@burratino> (raw)
In-Reply-To: <20120209153431.GA24033@godiug.sigxcpu.org>
Hi,
Guido Günther wrote[1]:
> as of 1.7.9 merging in a tag unconditionally spawns an editor. I tried
> turning this of with --no-edit but to no avail. This is a behaviour
> change that breaks tools like git-buildpackage. I wonder if this should
> be turned off by default?
Thanks. I can confirm this: ever since commit fab47d05 (merge: force
edit and no-ff mode when merging a tag object, 2011-11-07), running
"git checkout github/maint-1.5.6 && git merge --no-edit v1.7.2"
launches an editor window despite the caller's request. And I agree
that it is counter-intuitive.
Here's a quick band-aid. Unlike the case of [2], this does not
suppress the pulling-signed-tag magic when it kicks in, so the
resulting commit will record the signature and message of the tag you
merged, even though you have not carefully looked it over. Not sure
if that's a good or bad thing yet.
Patch relies on "merge: use editor by default in interactive sessions"
from master. If this looks like a sane approach, I can resend with a
proposed log message and a test for t/t7600-merge.sh. (Or if someone
else wants to do it first, even better.)
Hmm?
Jonathan
[1] http://bugs.debian.org/659255
[2] http://thread.gmane.org/gmane.comp.version-control.git/189825/focus=189989
diff --git i/builtin/merge.c w/builtin/merge.c
index 62c7b681..c401106e 100644
--- i/builtin/merge.c
+++ w/builtin/merge.c
@@ -1323,7 +1323,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
if (merge_remote_util(commit) &&
merge_remote_util(commit)->obj &&
merge_remote_util(commit)->obj->type == OBJ_TAG) {
- option_edit = 1;
+ if (option_edit < 0)
+ option_edit = 1;
allow_fast_forward = 0;
}
}
next parent reply other threads:[~2012-02-09 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120209153431.GA24033@godiug.sigxcpu.org>
2012-02-09 16:08 ` Jonathan Nieder [this message]
2012-02-09 18:11 ` git merge <tag>: Spawning an editor can't be disabled Junio C Hamano
2012-02-09 18:50 ` Johannes Sixt
2012-02-09 19:54 ` Junio C Hamano
2012-02-09 19:01 ` Jonathan Nieder
2012-02-09 21:20 ` Junio C Hamano
2012-02-09 21:34 ` Junio C Hamano
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=20120209160803.GA5742@burratino \
--to=jrnieder@gmail.com \
--cc=agx@sigxcpu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).