Skip to content

filter: support for excluding all trees and blobs

Matthew DeVore git 12 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest8 patches 3 repliesIn review
  2. v118 patches 2 repliesSuperseded
  3. v108 patches 1 replySuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v98 patches0 repliesSuperseded
v87 patches5 repliesSuperseded
v77 patches6 repliesSuperseded
v66 patches8 repliesSuperseded
v56 patches0 repliesSuperseded
v46 patches16 repliesSuperseded
v35 patches3 repliesSuperseded
v25 patches7 repliesSuperseded
v1 RFC5 patches9 repliesSuperseded

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8list-objects: store common func args in structlist-objects.c+74 -840 replies
2/8list-objects: refactor to process_tree_contentslist-objects.c+41 -270 replies
3/8list-objects: always parse trees gentlylist-objects.c+1 -30 replies
4/8rev-list: handle missing tree objects properlybuiltin/rev-list.c list-objects.c revision.h +3 more+110 -70 replies
5/8revision: mark non-user-given objects insteadlist-objects.c revision.c revision.h +1 more+39 -160 replies
6/8list-objects-filter: use BUG rather than dielist-objects-filter.c+4 -70 replies
7/8list-objects-filter-options: do not over-strbuf_initlist-objects-filter-options.c+2 -40 replies
8/8list-objects-filter: implement filter tree:0Documentation/rev-list-options.txt list-objects-filter-options.c list-objects-filter-options.h +4 more+153 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v12 yet.

Read the v12 thread

Cover letter [PATCH v12 0/8] filter: support for excluding all trees and blobs

Here is a re-roll-up since I haven't received any additional corrections for almost a week. The changes are very slight and just for clean-up so it is ready to be promoted to master.

This is the interdiff from last time:

t/t5317-pack-objects-filter-objects.sh +1 -1
index 510d3537f..d9dccf4d4 100755
@@ -69,7 +69,7 @@ test_expect_success 'get an error for missing tree object' '
         test_must_fail git -C r5 pack-objects --rev --stdout 2>bad_tree <<-EOF &&
         HEAD
         EOF
-        grep -q "bad tree object" bad_tree
+        grep "bad tree object" bad_tree
 '
 
 test_expect_success 'setup for tests of tree:0' '
t/t5616-partial-clone.sh +1 -1
index 53fbf7db8..392caa08f 100755
@@ -192,7 +192,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr
         xargs -n1 git -C dst cat-file -t >fetched_types &&
 
         sort -u fetched_types >unique_types.observed &&
-        printf "blob\ncommit\ntree\n" >unique_types.expected &&
+        test_write_lines blob commit tree >unique_types.expected &&
         test_cmp unique_types.expected unique_types.observed
 '
 
t/t6112-rev-list-filters-objects.sh +3 -3
index c8e3d87c4..08e0c7db6 100755
@@ -38,8 +38,8 @@ test_expect_success 'specify blob explicitly prevents filtering' '
                  awk -f print_2.awk) &&
 
         git -C r1 rev-list --objects --filter=blob:none HEAD $file_3 >observed &&
-        grep -q "$file_3" observed &&
-        test_must_fail grep -q "$file_4" observed
+        grep "$file_3" observed &&
+        ! grep "$file_4" observed
 '
 
 test_expect_success 'verify emitted+omitted == all' '
@@ -240,7 +240,7 @@ test_expect_success 'verify tree:0 includes trees in "filtered" output' '
         xargs -n1 git -C r3 cat-file -t >unsorted_filtered_types &&
 
         sort -u unsorted_filtered_types >filtered_types &&
-        printf "blob\ntree\n" >expected &&
+        test_write_lines blob tree >expected &&
         test_cmp expected filtered_types
 '
 

Thanks,

Matthew DeVore (8):
list-objects: store common func args in struct
list-objects: refactor to process_tree_contents
list-objects: always parse trees gently
rev-list: handle missing tree objects properly
revision: mark non-user-given objects instead
list-objects-filter: use BUG rather than die list-objects-filter-options: do not over-strbuf_init
list-objects-filter: implement filter tree:0

 Documentation/rev-list-options.txt     |   5 +
 builtin/rev-list.c                     |  11 +-
 list-objects-filter-options.c          |  19 +-
 list-objects-filter-options.h          |   1 +
 list-objects-filter.c                  |  60 ++++++-
 list-objects.c                         | 232 +++++++++++++------------
 revision.c                             |   1 -
 revision.h                             |  26 ++-
 t/t0410-partial-clone.sh               |  45 +++++
 t/t5317-pack-objects-filter-objects.sh |  41 +++++
 t/t5616-partial-clone.sh               |  42 +++++
 t/t6112-rev-list-filters-objects.sh    |  49 ++++++
 12 files changed, 404 insertions(+), 128 deletions(-)
Signature · 1 line
2.19.1.331.ge82ca0e54c-goog