pack_refs(): remove redundant check

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>

Michael Haggerty committed Jan 17, 2012 at 06:50 UTC e45a59955ec78bca12930bcf6aa9642fd94c9e7c
1 file changed +1 -2
pack-refs.c
+1 -2
@@ -143,7 +143,6 @@ int pack_refs(unsigned int flags)
143 packed.fd = -1;
144 if (commit_lock_file(&packed) < 0)
145 die_errno("unable to overwrite old ref-pack file");
146 - if (cbdata.flags & PACK_REFS_PRUNE)
147 - prune_refs(cbdata.ref_to_prune);
146 + prune_refs(cbdata.ref_to_prune);
147 return 0;
148 }