summaryrefslogtreecommitdiff
path: root/builtin/symbolic-ref.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-03-20 14:43:06 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-20 12:40:49 -0700
commit49672f26d9a3826a6a74c6ff4d2409b7b0c74495 (patch)
tree455516c784f1797d24873010410b4a5a225788c9 /builtin/symbolic-ref.c
parentt5312: test object deletion code paths in a corrupted repository (diff)
downloadtgif-49672f26d9a3826a6a74c6ff4d2409b7b0c74495.tar.xz
refs: introduce a "ref paranoia" flag
Most operations that iterate over refs are happy to ignore broken cruft. However, some operations should be performed with knowledge of these broken refs, because it is better for the operation to choke on a missing object than it is to silently pretend that the ref did not exist (e.g., if we are computing the set of reachable tips in order to prune objects). These processes could just call for_each_rawref, except that ref iteration is often hidden behind other interfaces. For instance, for a destructive "repack -ad", we would have to inform "pack-objects" that we are destructive, and then it would in turn have to tell the revision code that our "--all" should include broken refs. It's much simpler to just set a global for "dangerous" operations that includes broken refs in all iterations. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/symbolic-ref.c')
0 files changed, 0 insertions, 0 deletions