diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-12-08 15:58:50 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-08 09:58:52 -0800 |
commit | aa57b871dad3cca07abead9a8d1fefceffe7578d (patch) | |
tree | eb45a434cb5a253a5c8bb3ed63b1f9c0910891e5 /t/t5616-partial-clone.sh | |
parent | t5616: end-to-end tests for partial clone (diff) | |
download | tgif-aa57b871dad3cca07abead9a8d1fefceffe7578d.tar.xz |
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-x | t/t5616-partial-clone.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh index 3b8cc0bba2..433e07e0cb 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 |