All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matt Hunter" <m@lfurio.us>
To: "Harald Nordgren" <haraldnordgren@gmail.com>,
	<phillip.wood@dunelm.org.uk>
Cc: "Junio C Hamano" <gitster@pobox.com>, <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Jul 2026, #12)
Date: Fri, 31 Jul 2026 03:02:10 -0400	[thread overview]
Message-ID: <DKCKB3HW6VJA.19CQLPOHR6WTI@lfurio.us> (raw)
In-Reply-To: <CAHwyqnXYi76rMOWYEgJhoh2rXaTgLbze7mKd+WGoC9BbDFHXHA@mail.gmail.com>

On Thu Jul 30, 2026 at 2:11 AM EDT, Harald Nordgren wrote:
>> Without "--reedit-message", it will happily discard "amend!" and
>> "squash!" commit messages even though the user creating them is a strong
>> signal that they intended to use them to reword the commit.
>> "--reedit-message" is a rather verbose option name which does not make
>> sense to me as we're creating a new commit with a new message so we're
>> not re-editing anything. I've commented elsewhere that I strongly
>> dislike reusing the rebase squash message template for this command
>> where we can squash fixups into multiple different commits at the same
>> time.

I also agree with these points, but given that they were already brought
up and dismissed before, I felt it wasn't my place to try to dictate
high-level design.

I may be misunderstanding your current concern with the first sentence
Phillip, but this was (at least in part) one of the recent things
addressed in this feature [1] [2].  If we go with the assumption that the
default behavior is to squash all the changes, but abandon all context
outside that provided by the first commit, then accepting amend!
messages for that first commit seems to drive the behavior closer to
what you describe.

> Should we always do "--reedit-message" then, i.e. remove the option
> and have it as the default? Do we need a "--no-edit" switch then
> instead? Maybe not, user will then always have the editor opened and
> they can save and quit if they don't care.

A script running 'git history squash' may have a harder time with this,
though something like 'git -c core.editor=/bin/true history squash' is
at least _some_ workaround.

It would seem consistent with other git commands to offer both an --edit
and --no-edit option.  If --edit is the default, it may make sense to
offer the option anyway, for the sake of some potential future where
there exists a config 'history.editSquashMsg' (for example).  '--edit'
would then override a configured value of 'false'.  Of course, the
precedent is --reedit-message so far in 'git history'.

1: https://lore.kernel.org/git/DJY0QSJYNG0J.210HZQH198Y1N@lfurio.us/
2: https://lore.kernel.org/git/pull.2337.v9.git.git.1784128573.gitgitgadget@gmail.com/

  reply	other threads:[~2026-07-31  7:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27  3:09 What's cooking in git.git (Jul 2026, #12) Junio C Hamano
2026-07-29 13:24 ` Phillip Wood
2026-07-29 14:18   ` Junio C Hamano
2026-07-29 15:20     ` Phillip Wood
2026-07-29 17:48       ` Junio C Hamano
2026-07-31  6:20     ` Matt Hunter
2026-07-31 15:36       ` Junio C Hamano
2026-07-30  6:11   ` Harald Nordgren
2026-07-31  7:02     ` Matt Hunter [this message]
2026-08-03  9:05       ` Phillip Wood
2026-08-03 16:02         ` Junio C Hamano
2026-08-03  9:11     ` Phillip Wood
2026-07-29 15:14 ` Phillip Wood
2026-07-29 15:52   ` 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=DKCKB3HW6VJA.19CQLPOHR6WTI@lfurio.us \
    --to=m@lfurio.us \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=haraldnordgren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.