summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-19 22:30:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-19 22:30:55 (GMT)
commitd38487e23d7e57a4d219b1fa73fc4da68061b1b4 (patch)
tree4154cf698664b1a38801d515fb54e2c33793870a
parent3043dbfab8cba19275c80425d1436651d4be4a4a (diff)
parent20a5fd881a98cfe153fa5a81754994c7046a6e41 (diff)
downloadgit-d38487e23d7e57a4d219b1fa73fc4da68061b1b4.zip
git-d38487e23d7e57a4d219b1fa73fc4da68061b1b4.tar.gz
git-d38487e23d7e57a4d219b1fa73fc4da68061b1b4.tar.bz2
Merge branch 'jk/object-filter-with-bitmap' into next
The object reachability bitmap machinery and the partial cloning machinery were not prepared to work well together, because some object-filtering criteria partial clones use inherently rely on object traversal, but the bitmap machinery is an optimization to bypass that object traversal. There however are some cases that they can work together, and they were taught about this case. The comment-patch at the tip, while it is not incorrect per-se, may be a bit too much. I dunno. * jk/object-filter-with-bitmap: rev-list --count: comment on the use of count_right++
-rw-r--r--builtin/rev-list.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 35e14ad..f520111 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -262,6 +262,13 @@ static void show_object(struct object *obj, const char *name, void *cb_data)
return;
if (revs->count) {
+ /*
+ * The object count is always accumulated in the .count_right
+ * field for traversal that is not a left-right traversal,
+ * and cmd_rev_list() made sure that a .count request that
+ * wants to count non-commit objects, which is handled by
+ * the show_object() callback, does not ask for .left_right.
+ */
revs->count_right++;
return;
}