Skip to content

Commit 8f50984

Browse files
edigaryevgitster
authored andcommitted
rev-list-options: fix off-by-one in '--filter=blob:limit=<n>' explainer
'--filter=blob:limit=<n>' was introduced in 25ec7bc (list-objects: filter objects in traverse_commit_list, 2017-11-21) and later expanded to bitmaps in 84243da (pack-bitmap: implement BLOB_LIMIT filtering, 2020-02-14) The logic that was introduced in these commits (and that still persists to this day) omits blobs larger than _or equal_ to n bytes or units. However, the documentation (Documentation/rev-list-options.txt) states: >The form '--filter=blob:limit=<n>[kmg]' omits blobs larger than n bytes or units. n may be zero. Moreover, the t6113-rev-list-bitmap-filters.sh tests for exactly this logic, so it seems it is the documentation that needs fixing, not the code. This changes the explanation to be similar to Documentation/git-clone.txt, which is correct. Signed-off-by: Nikolay Edigaryev <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec58344 commit 8f50984

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/rev-list-options.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -927,10 +927,10 @@ ifdef::git-rev-list[]
927927
+
928928
The form '--filter=blob:none' omits all blobs.
929929
+
930-
The form '--filter=blob:limit=<n>[kmg]' omits blobs larger than n bytes
931-
or units. n may be zero. The suffixes k, m, and g can be used to name
932-
units in KiB, MiB, or GiB. For example, 'blob:limit=1k' is the same
933-
as 'blob:limit=1024'.
930+
The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
931+
bytes or units. n may be zero. The suffixes k, m, and g can be used
932+
to name units in KiB, MiB, or GiB. For example, 'blob:limit=1k'
933+
is the same as 'blob:limit=1024'.
934934
+
935935
The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects
936936
which are not of the requested type.

0 commit comments

Comments
 (0)