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

Re: [PATCH] branch: borrow --sort and --count from for-each-ref

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 18, 2012, 01:20 UTC
Message-ID
<CACsJy8An5oYv_Ki2oFezykSDFXmprPq07G7G4xq+srhcpP+OHg@mail.gmail.com>
In-Reply-To
<7vvcoaqe9h.fsf@alter.siamese.dyndns.org>
2012/1/18 Junio C Hamano <gitster@pobox.com>:
Show 16 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>>  Some time ago, I posted a patch that added date sort to git-branch
>>  and Peff pointed me to for-each-ref. I did not look at it closely.
>>  Now it does not seem hard to lend some code from for-each-ref to
>>  git-branch. I can list 10 most recently touched branches with
>>
>>   git branch --sort=-committerdate -v --count=10
>>
>>  kind of cool. I don't think adding --format is necessary because
>>  git-branch already has its own formatting.
>
> Why do we even need this for "git branch", when "git for-each-ref
> refs/heads" already does this?

coloring, current branch marking, "branch -v", more accessible command (I did not know about for-each-ref until Jeff told me)

-- 
Duy
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 3 of 4 in “branch: borrow --sort and --count from for-each-ref”
  1. branch: borrow --sort and --count from for-each-refNguyễn Thái Ngọc Duy, Jan 17, 2012
  2. Junio C HamanoJan 17, 2012
  3. Nguyen Thai Ngoc DuyJan 18, 2012
  4. branch: borrow --sort and --count from for-each-refNguyễn Thái Ngọc Duy, Feb 4, 2012

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.