git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "i.Dark_Templar" <darktemplar@dark-templar-archives.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 1/3] git-merge: add option to format default message using multiple lines
Date: Mon, 10 Feb 2020 21:51:02 +0300	[thread overview]
Message-ID: <2f0417b3-9e9e-f0db-ab11-92dd7cd2b29a@dark-templar-archives.net> (raw)
In-Reply-To: <xmqqtv3z1wq4.fsf@gitster-ct.c.googlers.com>

09.02.2020 20:44, Junio C Hamano пишет:
> "i.Dark_Templar" <darktemplar@dark-templar-archives.net> writes:
> 
>> If a lot of objects is merged at once, default commit message
>> could become one very long line, which might be inconvenient to read.
>> This change implements an option to change default autogenerated message
>> so it'd take multiple lines, but each line wouldn't be long.
>>
>> An artificial example.
>>
>> Original merge commit message:
>>     Merge branch 'branch_with_some_long_name_1', remote-tracking branch 'clone/remote_branch_with_some_name', tags 'some_tag' and 'some_other_tag'; commit 'ae46a39cead2b42282abce725e90b561c06e94ba'; commit '33d0281e0eeb2a5e9907ebedc230e28c46865092' into merge7
>>
>> Multiline merge commit message:
>>     Merge into merge8:
>>     branch 'branch_with_some_long_name_1'
>>     remote-tracking branch 'clone/remote_branch_with_some_name'
>>     tag 'some_tag'
>>     tag 'some_other_tag'
>>     commit 'ae46a39cead2b42282abce725e90b561c06e94ba'
>>     commit '33d0281e0eeb2a5e9907ebedc230e28c46865092'
> 
> 
> How would these commits appear in the "git shorlog" output?  Losing
> some information is OK (after all, you are making the 'title' of the
> merge commit less crowded to prefer 'simpler' summary in exchange),
> but you'd need to strike a good balance what to discard.  Is the
> fact that the name of branch that got some unspecified new things
> was 'merge8' the most important thing to convey?
> 
> If you make the commit 'title' a short one-line summary, you MUST
> have a blank line after that line.  Otherwise, the 'where does the
> title of this commit object end?' logic will helpfully merge all the
> lines in the first paragraph (i.e. up to the first blank line) into
> one long line, defeating your effort to make the summary simpler by
> losing details.  That is:
> 
>     Merge 6 commits into merge8
> 
>     branch 'branch_with_some_long_name_1'
>     remote-tracking ...
>     ...
> 
> That's it for the 'mechanics', i.e. a discussion about how a good
> design of this 'feature' should look like.
> 
> About the feature itself, I am not sure.  Even though I admit I was
> the one who invented octupus merges, and it does make the history
> look "pretty" in gitk when used judiciously, its practical benefit
> over repeated pairwise merges is doubtful.  Besides, it makes
> bisection less efficient.  So from that point of view, I am not sure
> if we want a feature to encourage creation of more octopus merges.
> 
> I haven't read the code yet---I usually don't before figuring out if
> the feature and its design makes sense---so I have no comment on the
> actual change at this moment.  I may send a separate review message
> later.
> 
> Thanks.
> 

Thank you for feedback.

I totally forgot about title in commit message and short log. I think
I'd like to take your suggestion and modify it a bit.
I want to add some text before enumeration of commits into message like
this:

Merge 6 commits into merge8

Following commits are merged:
branch 'branch_with_some_long_name_1'
remote-tracking ...
...

As for octopus merge, there are still some situations where it has some
advantages over series of pairwise merges, although I agree that it
might be uncommon cases. I can name linking multiple previously
unrelated histories as one such case. Bisect could be useless and
history would look better in my opinion.

If this feature would be fine with updated commit message, I'll update
my changes and send updated patch series.

  reply	other threads:[~2020-02-10 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 13:16 [RFC PATCH 0/3] git-merge: update default commit message i.Dark_Templar
2020-02-09 13:16 ` [RFC PATCH 1/3] git-merge: add option to format default message using multiple lines i.Dark_Templar
2020-02-09 17:44   ` Junio C Hamano
2020-02-10 18:51     ` i.Dark_Templar [this message]
2020-03-09 12:07       ` [RFC PATCH v2 0/2] git-merge: update default commit message i.Dark_Templar
2020-03-09 12:07         ` [RFC PATCH v2 1/2] git-merge: add option to format default message using multiple lines i.Dark_Templar
2020-03-09 16:20           ` Junio C Hamano
2020-03-09 19:45             ` i.Dark_Templar
2020-03-09 12:07         ` [RFC PATCH v2 2/2] Enable multiline merge commit message by default i.Dark_Templar
2020-02-09 13:16 ` [RFC PATCH 2/3] Add merge commit message type autoselect logic i.Dark_Templar
2020-02-09 13:16 ` [RFC PATCH 3/3] Enable merge commit message type autoselect logic by default i.Dark_Templar

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=2f0417b3-9e9e-f0db-ab11-92dd7cd2b29a@dark-templar-archives.net \
    --to=darktemplar@dark-templar-archives.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).