Re: [PATCH 4/6] t7500: add tests for --fixup[amend|reword] options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 17, 2021, 19:59 UTC
- Message-ID
- <xmqqsg5ujwi2.fsf@gitster.g>
- In-Reply-To
- <20210217073725.16656-4-charvi077@gmail.com>
Charvi Mendiratta <charvi077@gmail.com> writes:
> Subject: Re: [PATCH 4/6] t7500: add tests for --fixup[amend|reword] options
Isn't an equal '=' sign missing somewhere?
Show 12 quoted lines
> +test_fixup_reword_opt () {
> + test_expect_success C_LOCALE_OUTPUT "--fixup=reword: incompatible with $1" "
> + echo 'fatal: cannot combine reword option of --fixup with $1' >expect &&
> + test_must_fail git commit --fixup=reword:HEAD~ $1 2>actual &&
> + test_cmp expect actual
> + "
> +}
> +
> +for opt in --all --include --only
> +do
> + test_fixup_reword_opt $opt
> +doneAs I suspected earlier, a pathspec is not tested here, but it should be.
Show 5 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?
> test_expect_success 'commit --squash works with -F' ' > commit_for_rebase_autosquash_setup &&