From: Michael Haggerty Date: Tue, 17 Jan 2012 05:50:31 +0000 (+0100) Subject: pack_refs(): remove redundant check X-Git-Tag: v1.7.10-rc0~141^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e45a59955ec78bca12930bcf6aa9642fd94c9e7c;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/pack-refs.c b/pack-refs.c index 23bbd00e3..f09a05422 100644 --- a/pack-refs.c +++ b/pack-refs.c @@ -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; }