* [PATCH 0/1] commit: allow -m/-F with --fixup=amend: or reword:
@ 2026-05-18 11:22 erik
2026-05-18 11:22 ` [PATCH 1/1] " erik
0 siblings, 1 reply; 4+ messages in thread
From: erik @ 2026-05-18 11:22 UTC (permalink / raw)
To: git; +Cc: gitster, charvi077, Erik Cervin-Edin
From: Erik Cervin-Edin <erik@cervined.in>
The commit --fixup=reword: (and --fixup:amend) options are powerful but
currently not well-suited for non-interactive workflows.
I often find myself hacking away on a branch and the last thing I do is
finalize and formulate the commit messages. One of the current ways of
doing this is running an interactive rebase and picking the commits in
your branch to reword. However, doing this requires you to linearly go
through the messages and edit them one by one. The other options which
allows more flexible editing is to generate linear patches -- but this
trades editing freedom for branch topology freedom and has its own
drawbacks.
The --fixup=reword: flag introduced in 494d314a05 (commit: add
amend suboption to --fixup to create amend! commit, 2021-03-15),
adds a third workflow which allows rewording commits without initiating
a rebase and from the comfort of the HEAD of the branch. However, doing
such editing is only possible using $EDITOR, which restricts its use in
some workflows.
When amend:/reword: were introduced in Charvi's series, -m support
for amend fixups was discussed but not pursued
(xmqqwnuvsw0d.fsf@gitster.g and xmqqczwmsjzl.fsf@gitster.g):
On Fri, 26 Feb 2021 11:32:30 -0800, Junio C Hamano wrote:
> >> > + if (have_option_m)
> >> > + die(_("cannot combine -m with --fixup:%s"), fixup_message);
> >> > + else
> >> > + prepare_amend_commit(commit, &sb, &ctx);
> >>
> >> Hmph, why is -m so special? Should we allow --fixup=amend:<cmd>
> >> with -F (or -c/-C for that matter), or are these other options
> >> caught at a lot higher layer already and we do not have to check
> >> them here?
> >
> > yes, those options are caught earlier and give the error as below:
> > "Only one of -c/-C/-F/--fixup can be used."
> > and only `-m` is checked over here.
>
> And the reason why -m cannot be checked early is because we do not
> recognize which kind of "fixup" we are doing when "only one of
> -c/-C/-F/--fixup" check is made before this function is called?
>
> OK. I wonder if we can tell which kind of fixup we are doing much
> earlier, though. Then we could extend it to say "Only one of
> -c/-C/-F/-m/--fixup=amend:<commit> can be used", etc., and we do not
> have to have this "only -m is checked here, everything else is
> checked earlier" curiosity. But I do not know if such a change is
> necessarily an improvement. I guess a better "fix" would probably
> be to add a comment to this function where it only checks for "-m"
> and tell readers why -c/-C/-F do not have to be checked here.
This patch picks up that thread by allowing both -m and -F for
amend/reword fixups, bypassing the need for an interactive editor.
This makes it practical to, for example, write replacement messages in
files and batch-apply them as reword fixups without stepping through
each one interactively. It's also friendly to AI agents who have a hard time
editing text using a non-interactive $EDITOR.
Allowing -c/-C was also considered but left out of this patch -- it can
be added in a re-roll if reviewers think it's worthwhile. I could see it
being useful, for example if you want to use git notes as a re-write
commit message channel. Since this is my first patch I intentionally
thought it best to start small.
Erik Cervin-Edin (1):
commit: allow -m/-F with --fixup=amend: or reword:
Documentation/git-commit.adoc | 13 +++--
builtin/commit.c | 41 ++++++++++----
t/t7500-commit-template-squash-signoff.sh | 67 +++++++++++++++++++----
3 files changed, 92 insertions(+), 29 deletions(-)
--
2.54.0.772.g683d7313b1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] commit: allow -m/-F with --fixup=amend: or reword:
2026-05-18 11:22 [PATCH 0/1] commit: allow -m/-F with --fixup=amend: or reword: erik
@ 2026-05-18 11:22 ` erik
2026-05-18 12:39 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: erik @ 2026-05-18 11:22 UTC (permalink / raw)
To: git; +Cc: gitster, charvi077, Erik Cervin-Edin
From: Erik Cervin-Edin <erik@cervined.in>
--fixup=amend: and --fixup=reword: require an editor to supply the
replacement commit message. The -m and -F flags are rejected: -m is
caught by a die() in prepare_to_commit(), and -F is caught by
die_for_incompatible_opt4() which groups -F with --fixup as mutually
exclusive. This makes these modes unusable in non-interactive
workflows -- notably AI coding agents.
When the amend suboption was introduced in 494d314a05 (commit: add
amend suboption to --fixup to create amend! commit, 2021-03-15),
-m support for amend fixups was discussed but not pursued, and -F
was already caught by the higher-layer incompatibility check grouping
it with --fixup.
Allow -m and -F to supply the replacement message body for amend and
reword fixups. When provided, bypass the editor and directly use the
user's message as the body, replacing the original commit's message. For
-F, the file contents are read into the message strbuf and then handled
identically to -m.
Plain --fixup (without amend: or reword:) continues to reject -F but
still accepts -m (even though it's practically a no-op).
Signed-off-by: Erik Cervin Edin <erik@cervined.in>
---
Documentation/git-commit.adoc | 13 +++--
builtin/commit.c | 41 ++++++++++----
t/t7500-commit-template-squash-signoff.sh | 67 +++++++++++++++++++----
3 files changed, 92 insertions(+), 29 deletions(-)
diff --git a/Documentation/git-commit.adoc b/Documentation/git-commit.adoc
index 8329c1034b..9478d5d265 100644
--- a/Documentation/git-commit.adoc
+++ b/Documentation/git-commit.adoc
@@ -111,12 +111,13 @@ commit, but the additional commentary will be thrown away once the
The commit created by `--fixup=amend:<commit>` is similar but its
title is instead prefixed with "amend!". The log message of
_<commit>_ is copied into the log message of the "amend!" commit and
-opened in an editor so it can be refined. When `git rebase
---autosquash` squashes the "amend!" commit into _<commit>_, the
-log message of _<commit>_ is replaced by the refined log message
-from the "amend!" commit. It is an error for the "amend!" commit's
-log message to be empty unless `--allow-empty-message` is
-specified.
+opened in an editor so it can be refined. The replacement message may
+also be supplied directly using `-m` or `-F`, bypassing the need to open
+an editor. When `git rebase --autosquash` squashes the "amend!" commit
+into _<commit>_, the log message of _<commit>_ is replaced by the
+refined log message from the "amend!" commit. It is an error for the
+"amend!" commit's log message to be empty unless `--allow-empty-message`
+is specified.
+
`--fixup=reword:<commit>` is shorthand for `--fixup=amend:<commit>
--only`. It creates an "amend!" commit with only a log message
diff --git a/builtin/commit.c b/builtin/commit.c
index 28f6174503..269c2d782b 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -837,21 +837,19 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
hook_arg1 = "message";
/*
- * Only `-m` commit message option is checked here, as
- * it supports `--fixup` to append the commit message.
- *
- * The other commit message options `-c`/`-C`/`-F` are
- * incompatible with all the forms of `--fixup` and
- * have already errored out while parsing the `git commit`
- * options.
+ * `-m` (and `-F`, converted to `-m` earlier for
+ * amend/reword) appends the message body here.
+ * `-c`/`-C` are still incompatible with all forms
+ * of `--fixup`.
*/
if (have_option_m && !strcmp(fixup_prefix, "fixup"))
strbuf_addbuf(&sb, &message);
if (!strcmp(fixup_prefix, "amend")) {
if (have_option_m)
- die(_("options '%s' and '%s:%s' cannot be used together"), "-m", "--fixup", fixup_message);
- prepare_amend_commit(commit, &sb, &ctx);
+ strbuf_addbuf(&sb, &message);
+ else
+ prepare_amend_commit(commit, &sb, &ctx);
}
} else if (!stat(git_path_merge_msg(the_repository), &statbuf)) {
size_t merge_msg_start;
@@ -1338,10 +1336,12 @@ static int parse_and_validate_options(int argc, const char *argv[],
}
if (fixup_message && squash_message)
die(_("options '%s' and '%s' cannot be used together"), "--squash", "--fixup");
- die_for_incompatible_opt4(!!use_message, "-C",
+ die_for_incompatible_opt3(!!use_message, "-C",
!!edit_message, "-c",
- !!logfile, "-F",
!!fixup_message, "--fixup");
+ die_for_incompatible_opt3(!!use_message, "-C",
+ !!edit_message, "-c",
+ !!logfile, "-F");
die_for_incompatible_opt4(have_option_m, "-m",
!!edit_message, "-c",
!!use_message, "-C",
@@ -1410,6 +1410,9 @@ static int parse_and_validate_options(int argc, const char *argv[],
}
}
+ if (logfile && fixup_message && !strcmp(fixup_prefix, "fixup"))
+ die(_("options '%s' and '%s' cannot be used together"), "-F", "--fixup");
+
if (0 <= edit_flag)
use_editor = edit_flag;
@@ -1821,6 +1824,22 @@ int cmd_commit(int argc,
argc = parse_and_validate_options(argc, argv, builtin_commit_options,
builtin_commit_usage,
prefix, current_head, &s);
+
+ if (logfile && fixup_message && !strcmp(fixup_prefix, "amend")) {
+ if (!strcmp(logfile, "-")) {
+ if (isatty(0))
+ fprintf(stderr, _("(reading log message from standard input)\n"));
+ if (strbuf_read(&message, 0, 0) < 0)
+ die_errno(_("could not read log from standard input"));
+ } else {
+ if (strbuf_read_file(&message, logfile, 0) < 0)
+ die_errno(_("could not read log file '%s'"), logfile);
+ }
+ strbuf_complete_line(&message);
+ have_option_m = 1;
+ FREE_AND_NULL(logfile);
+ }
+
if (trailer_args.nr)
trailer_config_init();
diff --git a/t/t7500-commit-template-squash-signoff.sh b/t/t7500-commit-template-squash-signoff.sh
index 66aff8e097..b7579ad789 100755
--- a/t/t7500-commit-template-squash-signoff.sh
+++ b/t/t7500-commit-template-squash-signoff.sh
@@ -384,18 +384,28 @@ test_expect_success '--fixup=reword: ignores staged changes' '
test_cmp foo actual
'
-test_expect_success '--fixup=reword: error out with -m option' '
+test_expect_success '--fixup=amend: with -m option' '
commit_for_rebase_autosquash_setup &&
- echo "fatal: options '\''-m'\'' and '\''--fixup:reword'\'' cannot be used together" >expect &&
- test_must_fail git commit --fixup=reword:HEAD~ -m "reword commit message" 2>actual &&
- test_cmp expect actual
+ cat >expected <<-EOF &&
+ amend! $(git log -1 --format=%s HEAD~)
+
+ amend commit message
+ EOF
+ git commit --fixup=amend:HEAD~ -m "amend commit message" &&
+ get_commit_msg HEAD >actual &&
+ test_cmp expected actual
'
-test_expect_success '--fixup=amend: error out with -m option' '
+test_expect_success '--fixup=reword: with -m option' '
commit_for_rebase_autosquash_setup &&
- echo "fatal: options '\''-m'\'' and '\''--fixup:amend'\'' cannot be used together" >expect &&
- test_must_fail git commit --fixup=amend:HEAD~ -m "amend commit message" 2>actual &&
- test_cmp expect actual
+ cat >expected <<-EOF &&
+ amend! $(git log -1 --format=%s HEAD~)
+
+ reword commit message
+ EOF
+ git commit --fixup=reword:HEAD~ -m "reword commit message" &&
+ get_commit_msg HEAD >actual &&
+ test_cmp expected actual
'
test_expect_success 'consecutive amend! commits remove amend! line from commit msg body' '
@@ -432,6 +442,12 @@ test_expect_success 'deny to create amend! commit if its commit msg body is empt
test_cmp expected actual
'
+test_expect_success '--fixup=amend: -m with empty message aborts' '
+ commit_for_rebase_autosquash_setup &&
+ test_must_fail git commit --fixup=amend:HEAD~ -m "" 2>err &&
+ test_grep "empty commit message body" err
+'
+
test_expect_success 'amend! commit allows empty commit msg body with --allow-empty-message' '
commit_for_rebase_autosquash_setup &&
cat >expected <<-EOF &&
@@ -468,10 +484,37 @@ test_expect_success '--fixup=reword: give error with pathsec' '
test_cmp expect actual
'
-test_expect_success '--fixup=reword: -F give error message' '
- echo "fatal: options '\''-F'\'' and '\''--fixup'\'' cannot be used together" >expect &&
- test_must_fail git commit --fixup=reword:HEAD~ -F msg 2>actual &&
- test_cmp expect actual
+test_expect_success '--fixup=reword: with -F option' '
+ commit_for_rebase_autosquash_setup &&
+ echo "message from file" >msgfile &&
+ cat >expected <<-EOF &&
+ amend! $(git log -1 --format=%s HEAD~)
+
+ message from file
+ EOF
+ git commit --fixup=reword:HEAD~ -F msgfile &&
+ get_commit_msg HEAD >actual &&
+ test_cmp expected actual
+'
+
+test_expect_success '--fixup=amend: with -F option' '
+ commit_for_rebase_autosquash_setup &&
+ echo "amend message from file" >msgfile &&
+ cat >expected <<-EOF &&
+ amend! $(git log -1 --format=%s HEAD~)
+
+ amend message from file
+ EOF
+ git commit --fixup=amend:HEAD~ -F msgfile &&
+ get_commit_msg HEAD >actual &&
+ test_cmp expected actual
+'
+
+test_expect_success '-F with plain --fixup still errors' '
+ commit_for_rebase_autosquash_setup &&
+ echo "message" >msgfile &&
+ test_must_fail git commit --fixup HEAD~ -F msgfile 2>err &&
+ test_grep "cannot be used together" err
'
test_expect_success 'commit --squash works with -F' '
--
2.54.0.772.g683d7313b1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] commit: allow -m/-F with --fixup=amend: or reword:
2026-05-18 11:22 ` [PATCH 1/1] " erik
@ 2026-05-18 12:39 ` Junio C Hamano
2026-05-18 15:27 ` Phillip Wood
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2026-05-18 12:39 UTC (permalink / raw)
To: erik; +Cc: git, charvi077
erik@cervined.in writes:
> From: Erik Cervin-Edin <erik@cervined.in>
The name on this overriding in-body From: line, and the name on
Signed-off-by: line below, must match. Please pick a name with or
without hyphen and stick to it.
> --fixup=amend: and --fixup=reword: require an editor to supply the
> replacement commit message. The -m and -F flags are rejected: -m is
> caught by a die() in prepare_to_commit(), and -F is caught by
> die_for_incompatible_opt4() which groups -F with --fixup as mutually
> exclusive. This makes these modes unusable in non-interactive
> workflows -- notably AI coding agents.
"Unusable" may be stronger than reality, as you can make creatie use
of GIT_EDITOR to achieve what you want. "awkward" or "poorly suited"
would be more fitting.
> Plain --fixup (without amend: or reword:) continues to reject -F but
> still accepts -m (even though it's practically a no-op).
Is it "practically a no-op"? Wouldn't
$ git commit --fixup <commit> -m "message body"
be useful to leave a message in the resulting commit, which is later
to be squashed into the named <commit>? Actually squashing with "fixup!"
may lose the message supplied here, but wouldn't people use this
facility to more easily identify what each of the fixups are about?
For the same reason, "-F" would be just as useful as "-m" in this context,
and it feels a bit inconsistent to allow one while rejecting the other.
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 28f6174503..269c2d782b 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -837,21 +837,19 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
> hook_arg1 = "message";
>
> /*
> - * Only `-m` commit message option is checked here, as
> - * it supports `--fixup` to append the commit message.
> - *
> - * The other commit message options `-c`/`-C`/`-F` are
> - * incompatible with all the forms of `--fixup` and
> - * have already errored out while parsing the `git commit`
> - * options.
> + * `-m` (and `-F`, converted to `-m` earlier for
> + * amend/reword) appends the message body here.
> + * `-c`/`-C` are still incompatible with all forms
> + * of `--fixup`.
> */
> if (have_option_m && !strcmp(fixup_prefix, "fixup"))
> strbuf_addbuf(&sb, &message);
>
> if (!strcmp(fixup_prefix, "amend")) {
> if (have_option_m)
> - die(_("options '%s' and '%s:%s' cannot be used together"), "-m", "--fixup", fixup_message);
Good that you got rid of this overly long die() message line.
> - prepare_amend_commit(commit, &sb, &ctx);
> + strbuf_addbuf(&sb, &message);
> + else
> + prepare_amend_commit(commit, &sb, &ctx);
> }
> } else if (!stat(git_path_merge_msg(the_repository), &statbuf)) {
> size_t merge_msg_start;
> @@ -1338,10 +1336,12 @@ static int parse_and_validate_options(int argc, const char *argv[],
> }
> if (fixup_message && squash_message)
> die(_("options '%s' and '%s' cannot be used together"), "--squash", "--fixup");
> - die_for_incompatible_opt4(!!use_message, "-C",
> + die_for_incompatible_opt3(!!use_message, "-C",
> !!edit_message, "-c",
> - !!logfile, "-F",
> !!fixup_message, "--fixup");
> + die_for_incompatible_opt3(!!use_message, "-C",
> + !!edit_message, "-c",
> + !!logfile, "-F");
> die_for_incompatible_opt4(have_option_m, "-m",
> !!edit_message, "-c",
> !!use_message, "-C",
> @@ -1410,6 +1410,9 @@ static int parse_and_validate_options(int argc, const char *argv[],
> }
> }
>
> + if (logfile && fixup_message && !strcmp(fixup_prefix, "fixup"))
> + die(_("options '%s' and '%s' cannot be used together"), "-F", "--fixup");
> +
> if (0 <= edit_flag)
> use_editor = edit_flag;
>
> @@ -1821,6 +1824,22 @@ int cmd_commit(int argc,
> argc = parse_and_validate_options(argc, argv, builtin_commit_options,
> builtin_commit_usage,
> prefix, current_head, &s);
> +
> + if (logfile && fixup_message && !strcmp(fixup_prefix, "amend")) {
> + if (!strcmp(logfile, "-")) {
> + if (isatty(0))
> + fprintf(stderr, _("(reading log message from standard input)\n"));
> + if (strbuf_read(&message, 0, 0) < 0)
> + die_errno(_("could not read log from standard input"));
> + } else {
> + if (strbuf_read_file(&message, logfile, 0) < 0)
> + die_errno(_("could not read log file '%s'"), logfile);
> + }
> + strbuf_complete_line(&message);
> + have_option_m = 1;
> + FREE_AND_NULL(logfile);
> + }
> +
It is curious that for this new feature alone, but not the other
existing code paths, "-m" and "-F" options reads from file in the
new code here, instead of letting the existing code for "-F" to read
(which happens inside prepare_to_commit(), I presume?).
A potential problem of the above code is if we find something wrong
in message and complain later in the control flow, we have long lost
where the message came from, as the point of the above code is
exactly to pretend that "--fixup:amend/reword -F" message did *not*
come from a file with the "-F" option, but from the command line via
the "-m" option.
> +test_expect_success '--fixup=amend: with -m option' '
> commit_for_rebase_autosquash_setup &&
> - echo "fatal: options '\''-m'\'' and '\''--fixup:reword'\'' cannot be used together" >expect &&
> - test_must_fail git commit --fixup=reword:HEAD~ -m "reword commit message" 2>actual &&
> - test_cmp expect actual
> + cat >expected <<-EOF &&
This comment is not about the added logic, but I notice that among
86 hits with string "expect" in this file in today's "master", only
14 hits are with string "expected", i.e., the prevalent name for the
"golden copy result" that is compared with the actula result (called
"actual") is "expect", not "expected". Please do not make the
situation worse.
> - test_cmp expect actual
> + cat >expected <<-EOF &&
Ditto.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] commit: allow -m/-F with --fixup=amend: or reword:
2026-05-18 12:39 ` Junio C Hamano
@ 2026-05-18 15:27 ` Phillip Wood
0 siblings, 0 replies; 4+ messages in thread
From: Phillip Wood @ 2026-05-18 15:27 UTC (permalink / raw)
To: Junio C Hamano, erik; +Cc: git, charvi077
On 18/05/2026 13:39, Junio C Hamano wrote:
> erik@cervined.in writes:
>
>> From: Erik Cervin-Edin <erik@cervined.in>
>
> The name on this overriding in-body From: line, and the name on
> Signed-off-by: line below, must match. Please pick a name with or
> without hyphen and stick to it.
>
>> --fixup=amend: and --fixup=reword: require an editor to supply the
>> replacement commit message. The -m and -F flags are rejected: -m is
>> caught by a die() in prepare_to_commit(), and -F is caught by
>> die_for_incompatible_opt4() which groups -F with --fixup as mutually
>> exclusive. This makes these modes unusable in non-interactive
>> workflows -- notably AI coding agents.
>
> "Unusable" may be stronger than reality, as you can make creatie use
> of GIT_EDITOR to achieve what you want. "awkward" or "poorly suited"
> would be more fitting.
Indeed
>> Plain --fixup (without amend: or reword:) continues to reject -F but
>> still accepts -m (even though it's practically a no-op).
>
> Is it "practically a no-op"? Wouldn't
>
> $ git commit --fixup <commit> -m "message body"
>
> be useful to leave a message in the resulting commit, which is later
> to be squashed into the named <commit>? Actually squashing with "fixup!"
> may lose the message supplied here, but wouldn't people use this
> facility to more easily identify what each of the fixups are about?
Yes, I find it quite useful to make a note of what the fixup is doing if
I know I'm not going to squash it for a while.
> For the same reason, "-F" would be just as useful as "-m" in this context,
> and it feels a bit inconsistent to allow one while rejecting the other.
Yes, looking at the way the code is structured I wonder if these options
were made incompatible to simplify the implementation, or maybe the
implementation merely reflects those restrictions.
>> @@ -1821,6 +1824,22 @@ int cmd_commit(int argc,
>> argc = parse_and_validate_options(argc, argv, builtin_commit_options,
>> builtin_commit_usage,
>> prefix, current_head, &s);
>> +
>> + if (logfile && fixup_message && !strcmp(fixup_prefix, "amend")) {
>> + if (!strcmp(logfile, "-")) {
>> + if (isatty(0))
>> + fprintf(stderr, _("(reading log message from standard input)\n"));
>> + if (strbuf_read(&message, 0, 0) < 0)
>> + die_errno(_("could not read log from standard input"));
>> + } else {
>> + if (strbuf_read_file(&message, logfile, 0) < 0)
>> + die_errno(_("could not read log file '%s'"), logfile);
>> + }
>> + strbuf_complete_line(&message);
>> + have_option_m = 1;
>> + FREE_AND_NULL(logfile);
>> + }
>> +
>
> It is curious that for this new feature alone, but not the other
> existing code paths, "-m" and "-F" options reads from file in the
> new code here, instead of letting the existing code for "-F" to read
> (which happens inside prepare_to_commit(), I presume?).
>
> A potential problem of the above code is if we find something wrong
> in message and complain later in the control flow, we have long lost
> where the message came from, as the point of the above code is
> exactly to pretend that "--fixup:amend/reword -F" message did *not*
> come from a file with the "-F" option, but from the command line via
> the "-m" option.
It is indeed unfortunate that we end up duplicating the code to read the
logfile here. I wonder how hard it would be to refactor
prepare_to_commit() so that it can accommodate "--fixup=amend:<commit> -F"
>> +test_expect_success '--fixup=amend: with -m option' '
>> commit_for_rebase_autosquash_setup &&
>> - echo "fatal: options '\''-m'\'' and '\''--fixup:reword'\'' cannot be used together" >expect &&
>> - test_must_fail git commit --fixup=reword:HEAD~ -m "reword commit message" 2>actual &&
>> - test_cmp expect actual
>> + cat >expected <<-EOF &&
>
> This comment is not about the added logic, but I notice that among
> 86 hits with string "expect" in this file in today's "master", only
> 14 hits are with string "expected", i.e., the prevalent name for the
> "golden copy result" that is compared with the actula result (called
> "actual") is "expect", not "expected". Please do not make the
> situation worse.
In this case it would be better to use
test_commit_message HEAD <<-EOF
amend! $(git log -1 --format=%s HEAD~)
amend commit message
EOF
and avoid creating actual and expect all together.
Thanks
Phillip
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-18 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox