Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-01-17 09:50:31 +0400
committerJunio C Hamano <gitster@pobox.com>2012-01-17 23:41:41 +0400
commite45a59955ec78bca12930bcf6aa9642fd94c9e7c (patch)
tree52659a4f55c7511b85d8bbc7529bb3dc77f026cb /pack-refs.c
parent6db5c6e43dccb380ca6e9947777985eb11248c31 (diff)
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>
Diffstat (limited to 'pack-refs.c')
-rw-r--r--pack-refs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pack-refs.c b/pack-refs.c
index 23bbd00e3e..f09a054228 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;
}