Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs
- Date: Thu, 31 Jan 2019 10:21:41 +0200
- From: Max Kirillov <max@xxxxxxxxxx>
- Subject: Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs
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