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

Re: [PATCH v5 0/8] port the filtering part of branch.c to use ref-filter APIs

From
Karthik Nayak <karthik.188@gmail.com>
Date
Sep 21, 2015, 06:11 UTC
Message-ID
<CAOLa=ZSyMV04wjhdM11RK9z8fz5tHM4PzPBxrN8_VA_Cacw82g@mail.gmail.com>
In-Reply-To
<vpqwpvkgblz.fsf@anie.imag.fr>

On Mon, Sep 21, 2015 at 12:30 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 23 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> --- a/t/t3203-branch-output.sh
>> +++ b/t/t3203-branch-output.sh
>> @@ -145,8 +145,8 @@ EOF
>>
>>  test_expect_success 'git branch `--sort` option' '
>>       cat >expect <<-\EOF &&
>> -     * (HEAD detached from fromtag)
>>         branch-two
>> +     * (HEAD detached from fromtag)
>>         branch-one
>>         master
>>       EOF
>
> I thought this was obviously wrong, but this tests uses
> --sort=objectsize, so it's OK. Indeed, HEAD and branch-one have
> objectsize=215, and branch-two has objectsize=167.
>
> So, the previous code was hardcoding "detached HEAD always comes first",
> but we now sort the whole list, including detached HEAD, so branch-two
> comes first.
>

Yeah! Even Junio said this was better, and even I think this is what the user would expect.

-- 
Regards,
Karthik Nayak
Previous: Matthieu MoyNext: Matthieu Moy
Message 17 of 19 in “port the filtering part of branch.c to use ref-filter APIs”
  1. 0/8 port the filtering part of branch.c to use ref-filter APIsKarthik Nayak, Sep 20, 2015
  2. 1/8 branch: refactor width computationKarthik Nayak, Sep 20, 2015
  3. 2/8 branch: bump get_head_description() to the topKarthik Nayak, Sep 20, 2015
  4. 3/8 branch: roll show_detached HEAD into regular ref_listKarthik Nayak, Sep 20, 2015
  5. Matthieu MoySep 20, 2015
  6. 4/8 branch: move 'current' check down to the presentation layerKarthik Nayak, Sep 20, 2015
  7. 5/8 branch: drop non-commit error reportingKarthik Nayak, Sep 20, 2015
  8. Matthieu MoySep 20, 2015
  9. Karthik NayakSep 21, 2015
  10. Karthik NayakSep 21, 2015
  11. 6/8 branch.c: use 'ref-filter' data structuresKarthik Nayak, Sep 20, 2015
  12. 7/8 branch.c: use 'ref-filter' APIsKarthik Nayak, Sep 20, 2015
  13. Matthieu MoySep 20, 2015
  14. Karthik NayakSep 21, 2015
  15. 8/8 branch: add '--points-at' optionKarthik Nayak, Sep 20, 2015
  16. Matthieu MoySep 20, 2015
  17. Karthik NayakSep 21, 2015
  18. Matthieu MoySep 21, 2015
  19. Karthik NayakSep 21, 2015

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.