From: Junio C Hamano Date: Sun, 20 Apr 2008 16:52:32 GMT Subject: Re: [PATCH v2 02/13] Don't append default merge message to -m message Message-ID: <7v7iescvu7.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1208132469-26471-2-git-send-email-joerg@alea.gnuu.de> Jörg Sommer writes: > From: gitster@pobox.com (Junio C Hamano) > Date: Sun, 23 Mar 2008 22:17:09 -0700 > > Signed-off-by: Jörg Sommer I'd admit that this was taken from my "You could do this" patch, and I am inclined to think that the users would probably want this behaviour of dropping the default merge summary when giving their own message with -m, but I am not absolutely convinced that doing this unconditionally is the right thing to do (iow, some people might have relied on the current behaviour). List, any objections? > --- > git-merge.sh | 24 +++++++++++++----------- > 1 files changed, 13 insertions(+), 11 deletions(-) > > diff --git a/git-merge.sh b/git-merge.sh > index 7dbbb1d..bd9699d 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 > > -- > 1.5.5