Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 30, 2019 at 06:31:34PM -0500, Eric Sunshine wrote:
> On Wed, Jan 30, 2019 at 6:21 PM Max Kirillov <max@xxxxxxxxxx> wrote:
>> +                               strbuf_addf(err, "broken sorting in packed-refs: '%s' > '%s'",
>> +                                           prev_ref.buf,
>> +                                           iter->refname);

> strbuf_release(&prev_ref) either here or after the "error" label.

Thanks! I seem to forget about it.

> > +               git branch b$(printf "%02d" $num) || break

> This should probably be "|| return 1" rather than "|| break" in order
> to fail the test immediately.

I've been looking for the correct way, and have seen the
break somewhere. Now I see the "return 1" is mostly user.
Thanks, will fix.

> Use test_must_fail() rather than '!' when expecting a Git command to fail.

Will fix in both places



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux