From: Junio C Hamano Date: Thu, 10 May 2012 17:49:07 +0000 (-0700) Subject: Merge branch 'mh/ref-api-lazy-loose' X-Git-Tag: v1.7.11-rc0~49 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aa6912b081d11dfa8afaab3a3c5665833e8349df;p=git.git Merge branch 'mh/ref-api-lazy-loose' Refs API is updated to lazily read sub-hierarchies of refs/ namespace, so that we do not have to grab everything from the filesystem when we are only interested in listing branches, for example. By Michael Haggerty (17) and Junio C Hamano (1) * mh/ref-api-lazy-loose: refs: fix find_containing_dir() regression refs: read loose references lazily read_loose_refs(): eliminate ref_cache argument struct ref_dir: store a reference to the enclosing ref_cache search_for_subdir(): return (ref_dir *) instead of (ref_entry *) get_ref_dir(): add function for getting a ref_dir from a ref_entry read_loose_refs(): rename function from get_ref_dir() refs: wrap top-level ref_dirs in ref_entries find_containing_dir(): use strbuf in implementation of this function bisect: copy filename string obtained from git_path() do_for_each_reflog(): use a strbuf to hold logfile name do_for_each_reflog(): return early on error get_ref_dir(): take the containing directory as argument refs.c: extract function search_for_subdir() get_ref_dir(): require that the dirname argument ends in '/' get_ref_dir(): rename "base" parameter to "dirname" get_ref_dir(): use a strbuf to hold refname get_ref_dir(): return early if directory cannot be read --- aa6912b081d11dfa8afaab3a3c5665833e8349df