summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6db5c6e)
raw | patch | inline | side by side (parent: 6db5c6e)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Tue, 17 Jan 2012 05:50:31 +0000 (06:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Jan 2012 19:41:41 +0000 (11:41 -0800) |
handle_one_ref() only adds refs to the cbdata.ref_to_prune list if
(cbdata.flags & PACK_REFS_PRUNE) is set. So any references in this
list at the end of pack_refs() can be pruned unconditionally.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
(cbdata.flags & PACK_REFS_PRUNE) is set. So any references in this
list at the end of pack_refs() can be pruned unconditionally.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-refs.c | patch | blob | history |
diff --git a/pack-refs.c b/pack-refs.c
index 23bbd00e3e542e844fce08156c5c1073e6437d43..f09a05422854c919cd31c542b82b057624275959 100644 (file)
--- a/pack-refs.c
+++ b/pack-refs.c
packed.fd = -1;
if (commit_lock_file(&packed) < 0)
die_errno("unable to overwrite old ref-pack file");
- if (cbdata.flags & PACK_REFS_PRUNE)
- prune_refs(cbdata.ref_to_prune);
+ prune_refs(cbdata.ref_to_prune);
return 0;
}