aboutsummaryrefslogtreecommitdiff
path: root/walker.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-04-10 07:30:26 +0200
committerJunio C Hamano <gitster@pobox.com>2012-04-10 15:55:55 -0700
commit432ad41e60cedb87ceec446ab034d46a53f5f9d8 (patch)
treeecad7dc0dded731e655867fb86e1a5b41cac865b /walker.c
parent81a79d8e27f6dd5908ae9ba122833574b7475151 (diff)
downloadgit-432ad41e60cedb87ceec446ab034d46a53f5f9d8.tar.gz
git-432ad41e60cedb87ceec446ab034d46a53f5f9d8.tar.xz
refs: store references hierarchically
Store references hierarchically in a tree that matches the pseudo-directory structure of the reference names. Add a new kind of ref_entry (with flag REF_DIR) to represent a whole subdirectory of references. Sort ref_dirs one subdirectory at a time. NOTE: the dirs can now be sorted as a side-effect of other function calls. Therefore, it would be problematic to do something from a each_ref_fn callback that could provoke the sorting of a directory that is currently being iterated over (i.e., the directory containing the entry that is being processed or any of its parents). This is a bit far-fetched, because a directory is always sorted just before being iterated over. Therefore, read-only accesses cannot trigger the sorting of a directory whose iteration has already started. But if a callback function would add a reference to a parent directory of the reference in the iteration, then try to resolve a reference under that directory, a re-sort could be triggered and cause the iteration to work incorrectly. Nevertheless...add a comment in refs.h warning against modifications during iteration. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'walker.c')
0 files changed, 0 insertions, 0 deletions