From: Junio C Hamano <gitster@pobox.com>
To: Erik Cervin-Edin <erik@cervined.in>
Cc: git@vger.kernel.org, phillip.wood123@gmail.com
Subject: Re: [PATCH v5 3/3] commit: allow -c/-C for all --fixup variants
Date: Sun, 29 Nov 2026 10:34:22 -0800 [thread overview]
Message-ID: <xmqq4iczij0x.fsf@gitster.g> (raw)
In-Reply-To: <9ab3665cfc381e54b8412c0bb0dae82b72d2d497.1795867565.git.erik@cervined.in> (Erik Cervin-Edin's message of "Sat, 28 Nov 2026 13:14:02 +0100")
Erik Cervin-Edin <erik@cervined.in> writes:
> Plain --fixup turns the editor off. Keep it on when using -c, so that
> -c isn't silently treated like -C.
I believe that this matches what Phillip suggested us doing, and I agree
that would be a desirable behaviour.
I however do not see this combination of --fixup and -c covered in new
tests in t7500. Should we have one, or is it too trivial?
> Helped-by: Junio C Hamano <gitster@pobox.com>
I do not think I deserve this line as much as others would.
> Signed-off-by: Erik Cervin-Edin <erik@cervined.in>
> @@ -1396,7 +1401,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
> } else {
> fixup_commit = fixup_message;
> fixup_prefix = "fixup";
> - use_editor = 0;
> + if (!edit_message)
> + use_editor = 0;
> }
> }
Tricky but true. Naively if you do not have a message you would think
you want to use editor to give the user a chance to supply one, but that
is not how this part of the world works. It might deserve a short
in-code comment why disabling of use_editor is done here and only when
!edit_message to help future readers. I dunno.
Thanks.
next prev parent reply other threads:[~2026-11-29 18:34 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 11:22 [PATCH 0/1] commit: allow -m/-F with --fixup=amend: or reword: erik
2026-05-18 11:22 ` [PATCH 1/1] " erik
2026-05-18 12:39 ` Junio C Hamano
2026-05-18 15:27 ` Phillip Wood
2026-05-24 15:00 ` Erik Cervin Edin
2026-05-26 10:47 ` [PATCH v2 0/2] commit: allow -m/-F/-c/-C for all --fixup variations erik
2026-05-26 10:47 ` [PATCH v2 1/2] commit: allow -m/-F for all kinds of --fixup erik
2026-05-26 10:47 ` [PATCH v2 2/2] commit: allow -c/-C " erik
2026-08-26 21:31 ` Junio C Hamano
2026-09-04 18:47 ` Erik Cervin Edin
2026-09-22 13:04 ` [PATCH v3 0/2] commit: allow -m/-F/-c/-C for all --fixup variations erik
2026-09-22 13:04 ` [PATCH v3 1/2] commit: allow -m/-F for all kinds of --fixup erik
2026-10-21 15:11 ` Phillip Wood
2026-09-22 13:04 ` [PATCH v3 2/2] commit: allow -c/-C " erik
2026-10-21 15:10 ` Phillip Wood
2026-10-21 15:13 ` [PATCH v3 0/2] commit: allow -m/-F/-c/-C for all --fixup variations Phillip Wood
2026-11-05 14:51 ` Erik Cervin-Edin
2026-11-09 10:54 ` Phillip Wood
2026-11-24 23:32 ` [PATCH v4 0/3] commit: allow -m/-F/-c/-C for all --fixup variants Erik Cervin-Edin
2026-11-24 23:32 ` [PATCH v4 1/3] commit: write the --fixup subject the way --squash does Erik Cervin-Edin
2026-11-24 23:32 ` [PATCH v4 2/3] commit: allow -m/-F for all --fixup variants Erik Cervin-Edin
2026-11-24 23:32 ` [PATCH v4 3/3] commit: allow -c/-C " Erik Cervin-Edin
2026-11-25 14:37 ` [PATCH v4 0/3] commit: allow -m/-F/-c/-C " Phillip Wood
2026-11-26 9:17 ` erik88
2026-11-26 15:07 ` Phillip Wood
2026-11-28 12:13 ` [PATCH v5 " Erik Cervin-Edin
2026-11-28 12:13 ` [PATCH v5 1/3] commit: write the --fixup subject the way --squash does Erik Cervin-Edin
2026-11-29 1:31 ` Junio C Hamano
2026-11-28 12:14 ` [PATCH v5 2/3] commit: allow -m/-F for all --fixup variants Erik Cervin-Edin
2026-11-29 1:51 ` Junio C Hamano
2026-11-28 12:14 ` [PATCH v5 3/3] commit: allow -c/-C " Erik Cervin-Edin
2026-11-29 18:34 ` Junio C Hamano [this message]
2026-11-30 14:28 ` Phillip Wood
2026-11-30 14:29 ` [PATCH v5 0/3] commit: allow -m/-F/-c/-C " 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4iczij0x.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=erik@cervined.in \
--cc=git@vger.kernel.org \
--cc=phillip.wood123@gmail.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.
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.