From: Junio C Hamano Date: Tue, 17 Jan 2012 20:12:58 GMT Subject: Re: [PATCH] branch: borrow --sort and --count from for-each-ref Message-ID: <7vvcoaqe9h.fsf@alter.siamese.dyndns.org> In-Reply-To: <1326805907-19416-1-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > 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?