summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDirk Gouders <dirk@gouders.net>2024-03-27 11:22:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-03-27 16:24:34 (GMT)
commitaf3888890e7eda11c54f0eca96a69b8178f46bff (patch)
tree22229119d72d9236a31fc5b83b722c72dc0876d9 /Documentation
parent34e0b72b198a90a92f5b19b989bc8f0c7bfef148 (diff)
downloadgit-af3888890e7eda11c54f0eca96a69b8178f46bff.zip
git-af3888890e7eda11c54f0eca96a69b8178f46bff.tar.gz
git-af3888890e7eda11c54f0eca96a69b8178f46bff.tar.bz2
MyFirstObjectWalk: fix filtered object walk
Commit f0d2f84919 (MyFirstObjectWalk: update recommended usage, 2022-03-09) changed a call of parse_list_objects_filter() in a way that probably never worked: parse_list_objects_filter() always needed a pointer as its first argument. Fix this by removing the CALLOC_ARRAY and passing the address of rev->filter to parse_list_objects_filter() in accordance to such a call in revisions.c, for example. Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/MyFirstObjectWalk.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index c33d22a..a06c712 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -734,8 +734,8 @@ walk we've just performed:
} else {
trace_printf(
_("Filtered object walk with filterspec 'tree:1'.\n"));
- CALLOC_ARRAY(rev->filter, 1);
- parse_list_objects_filter(rev->filter, "tree:1");
+
+ parse_list_objects_filter(&rev->filter, "tree:1");
}
traverse_commit_list(rev, walken_show_commit,
walken_show_object, NULL);