summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-07-01 18:42:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-01 19:00:50 (GMT)
commitc8a70d35090c490ce0e9f1354ef372b2887bea28 (patch)
treece7496ef602855265f6980c6556cecd2bf8f0607 /builtin
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-c8a70d35090c490ce0e9f1354ef372b2887bea28.zip
git-c8a70d35090c490ce0e9f1354ef372b2887bea28.tar.gz
git-c8a70d35090c490ce0e9f1354ef372b2887bea28.tar.bz2
rev-list: disable --use-bitmap-index when pruning commits
The reachability bitmaps do not have enough information to tell us which commits might have changed path "foo", so the current code produces wrong answers for: git rev-list --use-bitmap-index --count HEAD -- foo (it silently ignores the "foo" limiter). Instead, we should fall back to doing a normal traversal (it is OK to fall back rather than complain, because --use-bitmap-index is a pure optimization, and might not kick in for other reasons, such as there being no bitmaps in the repository). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rev-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index ff84a82..88eddbd 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -355,7 +355,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
if (bisect_list)
revs.limited = 1;
- if (use_bitmap_index) {
+ if (use_bitmap_index && !revs.prune) {
if (revs.count && !revs.left_right && !revs.cherry_mark) {
uint32_t commit_count;
if (!prepare_bitmap_walk(&revs)) {