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>
This commit is contained in:
parent
6db5c6e43d
commit
e45a59955e
@ -143,7 +143,6 @@ int pack_refs(unsigned int flags)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user