git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Joel Klinghed via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Joel Klinghed <the_jk@spawned.biz>
Subject: Re: [PATCH] commit: restore --edit when combined with --fixup
Date: Wed, 11 Aug 2021 16:24:30 -0400	[thread overview]
Message-ID: <YRQx/jXdydxMGBmS@coredump.intra.peff.net> (raw)
In-Reply-To: <pull.1014.git.1628689758413.gitgitgadget@gmail.com>

On Wed, Aug 11, 2021 at 01:49:18PM +0000, Joel Klinghed via GitGitGadget wrote:

> From: Joel Klinghed <the_jk@spawned.biz>
> 
> Recent changes to --fixup, adding amend suboption, caused the
> --edit flag to be ignored as use_editor was always set to zero.
> 
> Restore edit_flag having higher priority than fixup_message when
> deciding the value of use_editor by only changing the default
> if edit_flag is not set.

This is definitely a change in behavior due to 494d314a05 (commit: add
amend suboption to --fixup to create amend! commit, 2021-03-15). That
was in v2.32.0, so it's not a regression in the upcoming v2.33 which
needs to be handled in the next few days.

My inclination is to call it a regression and restore the original
behavior. But when I was going to suggest that you add a test, it made
me wonder: what would we be testing for?

If the user says "git commit --fixup HEAD --edit", it seems reasonable
for them to expect that the editor is run, and that is easy to check.
But what are they planning to edit? If they modify the subject line of
the commit, it will wreck the "fixup!" mechanism. If they modify the
body (which starts blank), it's going to be discarded by the fixup
operation.

Is the goal that they might leave notes for themselves, which they can
view in the meantime before they run "rebase --autosquash"?

-Peff

  reply	other threads:[~2021-08-11 20:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 13:49 [PATCH] commit: restore --edit when combined with --fixup Joel Klinghed via GitGitGadget
2021-08-11 20:24 ` Jeff King [this message]
2021-08-11 22:10   ` Joel Klinghed
2021-08-11 22:22     ` Jeff King
2021-08-11 23:27     ` brian m. carlson
2021-08-11 23:43 ` [PATCH v2] " Joel Klinghed via GitGitGadget
2021-08-12  5:21   ` Junio C Hamano
2021-08-12  7:42     ` Joel Klinghed
2021-08-12 19:51       ` Junio C Hamano
2021-08-12  8:02   ` [PATCH v3] " Joel Klinghed via GitGitGadget
2021-08-12  9:32     ` Phillip Wood
2021-08-12 10:01       ` Joel Klinghed
2021-08-13 13:06         ` Phillip Wood
2021-08-13 15:35           ` Joel Klinghed
2021-08-14 15:20             ` Phillip Wood
2021-08-14 21:19               ` Joel Klinghed
2021-08-12 11:55     ` [PATCH v4] " Joel Klinghed via GitGitGadget
2021-08-14 21:40       ` [PATCH v5] " Joel Klinghed via GitGitGadget
2021-08-17 10:06         ` Phillip Wood

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=YRQx/jXdydxMGBmS@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=the_jk@spawned.biz \
    /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).