Re: [PATCH] git-branch: only traverse the requested refs
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 10, 2007, 23:00 UTC
- Message-ID
- <Pine.LNX.4.64.0710102358110.4174@racer.site>
- In-Reply-To
- <1192053283-2351-1-git-send-email-hjemli@gmail.com>
Hi,
On Wed, 10 Oct 2007, Lars Hjemli wrote:
Show 9 quoted lines
> This avoids looking at every single file below .git/refs when git-branch
> is fetching the list of refs to display.
>
> [...]
>
> + if (kinds & REF_LOCAL_BRANCH) {
> + ref_list.kinds = REF_LOCAL_BRANCH;
> + for_each_branch_ref(append_ref, &ref_list);
> + }The function for_each_branch_ref() calls do_for_each_ref(), which in turn calls get_loose_refs(), which calls get_ref_dir() to read all loose refs, if they have not yet been read.
So I think that your patch (unfortunately) will no help Han-Wen's situation.
Ciao, Dscho