summaryrefslogtreecommitdiff
path: root/t/t5616-partial-clone.sh
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2017-12-08 15:58:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-08 17:58:52 (GMT)
commitaa57b871dad3cca07abead9a8d1fefceffe7578d (patch)
treeeb45a434cb5a253a5c8bb3ed63b1f9c0910891e5 /t/t5616-partial-clone.sh
parent35a7ae952ffee0d47d4f6302163488abea3bf418 (diff)
downloadgit-aa57b871dad3cca07abead9a8d1fefceffe7578d.zip
git-aa57b871dad3cca07abead9a8d1fefceffe7578d.tar.gz
git-aa57b871dad3cca07abead9a8d1fefceffe7578d.tar.bz2
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 <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5616-partial-clone.sh')
-rwxr-xr-xt/t5616-partial-clone.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index 3b8cc0b..433e07e 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -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
do
- 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
+'
+
test_done