From: Junio C Hamano <gitster@pobox.com>
To: "Jörg Sommer" <joerg@alea.gnuu.de>
Cc: git@vger.kernel.org
Subject: Re: git-merge adds test to a message -- bug?
Date: Sun, 23 Mar 2008 22:17:09 -0700 [thread overview]
Message-ID: <7vabko3dm2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <slrnfudp0q.19k.joerg@alea.gnuu.de> (Jörg Sommer's message of "Sun, 23 Mar 2008 23:13:31 +0000 (UTC)")
Jörg Sommer <joerg@alea.gnuu.de> writes:
> is it correct, that this test fails?
Interesting.
The following patch will change the bahaviour to what your test script
expects, but by looking at the original code, you can tell that it is
indeed the intended behaviour of "-M' to _allow_ you to _prepend_ your own
message to the standardized "Merge these" message, not _replace_ with it.
I unfortunately do not recall why _prepend_, and not _replace_, had to be
the right behaviour. Unless somebody can point out there was a valid
reason but that reason is not relevant anymore, I am reluctant to apply
the patch below this late in the cycle.
git-merge.sh | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/git-merge.sh b/git-merge.sh
index 7dbbb1d..a5ce649 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -250,17 +250,19 @@ else
# We are invoked directly as the first-class UI.
head_arg=HEAD
- # All the rest are the commits being merged; prepare
- # the standard merge summary message to be appended to
- # the given message. If remote is invalid we will die
- # later in the common codepath so we discard the error
- # in this loop.
- merge_name=$(for remote
- do
- merge_name "$remote"
- done | git fmt-merge-msg
- )
- merge_msg="${merge_msg:+$merge_msg$LF$LF}$merge_name"
+ if test -z "$merge_msg"
+ then
+ # All the rest are the commits being merged; prepare
+ # the standard merge summary message to be appended to
+ # the given message. If remote is invalid we will die
+ # later in the common codepath so we discard the error
+ # in this loop.
+ merge_msg=$(for remote
+ do
+ merge_name "$remote"
+ done | git fmt-merge-msg
+ )
+ fi
fi
head=$(git rev-parse --verify "$head_arg"^0) || usage
next prev parent reply other threads:[~2008-03-24 5:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-23 23:13 git-merge adds test to a message -- bug? Jörg Sommer
2008-03-24 5:17 ` Junio C Hamano [this message]
2008-03-24 11:08 ` Johannes Schindelin
2008-03-24 16:45 ` Junio C Hamano
2008-03-25 0:12 ` Jörg Sommer
2008-03-25 20:04 ` Johannes Schindelin
2008-04-09 10:40 ` Jörg Sommer
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=7vabko3dm2.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=joerg@alea.gnuu.de \
/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).