On Thu, Jul 26, 2018 at 12:49 PM Junio C Hamano <gits...@pobox.com> wrote:
> Chen Bin <chenbin...@gmail.com> writes:
> > +             git p4 submit --dry-run >out && grep "Would apply" out || 
> > echo "Abort submit"
>
> What is this last "|| echo I always succeed" about?
>
> Do you want to make sure "git p4 submit" exit with non-zero exit
> status *and* its output does not say "Would apply"?  The way to
> write that would be
>
>                 test_must_fail git p4 submit --dry-run >out &&
>                 ! grep "Would apply" out

I missed the 'test_must_fail' when I suggested this same rewrite[1],
which may explain why the suggestion wasn't used in the re-roll.
Sorry.

[1]: 
https://public-inbox.org/git/capig+cr2gyewotvbmrde35rn9ovsixeerbm5ijv+fmnoibw...@mail.gmail.com/

Reply via email to