path: root/t/
diff options
authorJeff Hostetler <>2017-12-08 15:58:50 (GMT)
committerJunio C Hamano <>2017-12-08 17:58:52 (GMT)
commitaa57b871dad3cca07abead9a8d1fefceffe7578d (patch)
treeeb45a434cb5a253a5c8bb3ed63b1f9c0910891e5 /t/
parent35a7ae952ffee0d47d4f6302163488abea3bf418 (diff)
fetch: inherit filter-spec from partial clone
Teach (partial) fetch to inherit the filter-spec used by the partial clone. Extend --no-filter to override this inheritance. Signed-off-by: Jeff Hostetler <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 21 insertions, 1 deletions
diff --git a/t/ b/t/
index 3b8cc0b..433e07e 100755
--- a/t/
+++ b/t/
@@ -59,7 +59,7 @@ test_expect_success 'push new commits to server' '
git -C src remote add srv "file://$(pwd)/srv.bare" &&
for x in a b c d e
- echo "Mod $x" >>src/file.1.txt
+ echo "Mod file.1.txt $x" >>src/file.1.txt
git -C src add file.1.txt
git -C src commit -m "mod $x"
done &&
@@ -93,4 +93,24 @@ test_expect_success 'verify blame causes dynamic object fetch' '
test_line_count = 0 observed
+# create new commits in "src" repo to establish a history on file.2.txt
+# and push to "srv.bare".
+test_expect_success 'push new commits to server for file.2.txt' '
+ for x in a b c d e f
+ do
+ echo "Mod file.2.txt $x" >>src/file.2.txt
+ git -C src add file.2.txt
+ git -C src commit -m "mod $x"
+ done &&
+ git -C src push -u srv master
+# Do FULL fetch by disabling filter-spec using --no-filter.
+# Verify we have all the new blobs.
+test_expect_success 'override inherited filter-spec using --no-filter' '
+ git -C pc1 fetch --no-filter origin &&
+ git -C pc1 rev-list master..origin/master --quiet --objects --missing=print >observed &&
+ test_line_count = 0 observed