Re: [PATCH v2 2/8] rm: support the --pathspec-from-file option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 10, 2020, 20:39 UTC
- Message-ID
- <xmqq4kvyyy5d.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <7ccbab52e51423a9ba74c0cab77448ceabb9dcdc.1581345948.git.gitgitgadget@gmail.com>
"Alexandr Miloslavskiy via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 22 quoted lines
> diff --git a/t/t3601-rm-pathspec-file.sh b/t/t3601-rm-pathspec-file.sh > new file mode 100755 > index 0000000000..4542a0f02f > --- /dev/null > +++ b/t/t3601-rm-pathspec-file.sh > @@ -0,0 +1,79 @@ > +#!/bin/sh > + > +test_description='rm --pathspec-from-file' > + > +. ./test-lib.sh > + > +test_tick > + > +test_expect_success setup ' > + echo A >fileA.t && > + echo B >fileB.t && > + echo C >fileC.t && > + echo D >fileD.t && > + git add fileA.t fileB.t fileC.t fileD.t && > + git commit -m "files" && > +
Trailing whitespace on this line.
Show 13 quoted lines
> + git tag checkpoint > +' > + ... > +test_expect_success 'error conditions' ' > + restore_checkpoint && > + echo fileA.t >list && > + > + test_must_fail git rm --pathspec-from-file=list -- fileA.t 2>err && > + test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err && > + > + test_must_fail git rm --pathspec-file-nul 2>err && > + test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err && > +
And here too.
Show 6 quoted lines
> + >empty_list && > + test_must_fail git rm --pathspec-from-file=empty_list 2>err && > + test_i18ngrep -e "No pathspec was given. Which files should I remove?" err > +' > + > +test_done