summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff-tree_master
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2013-04-22 21:52:27 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-01 15:33:10 -0700
commit506a760db8c3fd510d7ebe70c189672f185ee108 (patch)
tree7fe7f180f332c1b439e25aa156dc8bc41d00e56f /t/t4013/diff.diff-tree_master
parentsearch_ref_dir(): return an index rather than a pointer (diff)
downloadtgif-506a760db8c3fd510d7ebe70c189672f185ee108.tar.xz
refs: change how packed refs are deleted
Add a function remove_ref(), which removes a single entry from a reference cache. Use this function to reimplement repack_without_ref(). The old version iterated over all refs, packing all of them except for the one to be deleted, then discarded the entire packed reference cache. The new version deletes the doomed reference from the cache *before* iterating. This has two advantages: * the code for writing packed-refs becomes simpler, because it doesn't have to exclude one of the references. * it is no longer necessary to discard the packed refs cache after deleting a reference: symbolic refs cannot be packed, so packed references cannot depend on each other, so the rest of the packed refs cache remains valid after a reference is deleted. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_master')
0 files changed, 0 insertions, 0 deletions