summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2013-04-22 21:52:21 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-01 15:33:10 -0700
commit2312a7932080f17c2847ec3ce5dddbc65c2e0b41 (patch)
treea3fbe27bc6745af79eea92a4daea0b354153ccb7 /builtin/clone.c
parentpeel_object(): give more specific information in return value (diff)
downloadtgif-2312a7932080f17c2847ec3ce5dddbc65c2e0b41.tar.xz
peel_ref(): fix return value for non-peelable, not-current reference
The old version was inconsistent: when a reference was REF_KNOWS_PEELED but with a null peeled value, it returned non-zero for the current reference but zero for other references. Change the behavior for non-current references to match that of current_ref, which is what callers expect. Document the behavior. Current callers only call peel_ref() from within a for_each_ref-style iteration and only for the current ref; therefore, the buggy code path was never reached. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
0 files changed, 0 insertions, 0 deletions