Re: [PATCH 4/6] t7500: add tests for --fixup[amend|reword] options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 18, 2021, 19:26 UTC
- Message-ID
- <xmqqh7m9fa8e.fsf@gitster.g>
- In-Reply-To
- <CAPSFM5cjJ_b510wx+RtVkyxHk-aFDpOHaFRWqQuMuDf=73nBiA@mail.gmail.com>
Charvi Mendiratta <charvi077@gmail.com> writes:
Show 13 quoted lines
>> > +test_expect_success '--fixup=reword: -F give error message' ' >> > + echo "fatal: Only one of -c/-C/-F/--fixup can be used." >expect && >> > + test_must_fail git commit --fixup=reword:HEAD~ -F msg 2>actual && >> > + test_cmp expect actual >> > +' >> >> Why? If you can use -m msg, you should be able to use -F msgfile, >> too, no? > > Earlier I was thinking to let the `--fixup=amend:` use the same options as of > current `--fixup=` . But yes I agree that there should be -F option > also with `amend` > and `reword`.
Hmph, I was actually imagining the opposite---a context that does not want to take -c/-C/-F would not want to take -m, either.
Why is -m so special, and a lot more importantly, what would a user want to achieve by using "-m more-text" combined with this "--fixup=reword:<commit>" or "--fixup=amend:<commit>" feature?