git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Max Kirillov <max@max630.net>
Date
Jan 31, 2019, 08:21 UTC
Message-ID
<20190131082140.GA24787@jessie.local>
In-Reply-To
<CAPig+cTn2gURyQgWHZQMNf2cZ+zwFhbH1Q4iPmbwuvYjMrPZPg@mail.gmail.com>
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@max630.net> 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
Previous: Eric SunshineNext: Max Kirillov
Message 3 of 12 in “pack-refs: fail on falsely sorted packed-refs”
  1. pack-refs: fail on falsely sorted packed-refsMax Kirillov, Jan 30, 2019
  2. Eric SunshineJan 30, 2019
  3. Max KirillovJan 31, 2019
  4. pack-refs: fail on falsely sorted packed-refsMax Kirillov, Feb 8, 2019
  5. Eric SunshineFeb 8, 2019
  6. Max KirillovFeb 13, 2019
  7. Ævar Arnfjörð BjarmasonFeb 13, 2019
  8. SZEDER GáborFeb 13, 2019
  9. Max KirillovFeb 23, 2019
  10. Jeff KingFeb 14, 2019
  11. Max KirillovFeb 23, 2019
  12. Max KirillovFeb 13, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.