summaryrefslogtreecommitdiff
path: root/t/t5616-partial-clone.sh
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2018-10-05 21:54:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-06 23:51:18 (GMT)
commitbdbc17e86abe2471c4bd0d52cdc004835cb7bb3e (patch)
tree2038e498933dcf79ed8f53dfd179bdfba6b34d50 /t/t5616-partial-clone.sh
parenta378fee5b0795d671722d803b93b7b32941c0067 (diff)
downloadgit-bdbc17e86abe2471c4bd0d52cdc004835cb7bb3e.zip
git-bdbc17e86abe2471c4bd0d52cdc004835cb7bb3e.tar.gz
git-bdbc17e86abe2471c4bd0d52cdc004835cb7bb3e.tar.bz2
tests: standardize pipe placement
Instead of using a line-continuation and pipe on the second line, take advantage of the shell's implicit line continuation after a pipe character. So for example, instead of some long line \ | next line use some long line | next line And add a blank line before and after the pipe where it aids readability (it usually does). This better matches the coding style documented in Documentation/CodingGuidelines and used in shell scripts elsewhere in the tree. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5616-partial-clone.sh')
-rwxr-xr-xt/t5616-partial-clone.sh32
1 files changed, 19 insertions, 13 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index bbbe753..e4d032c 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -34,10 +34,12 @@ test_expect_success 'setup bare clone for server' '
# confirm partial clone was registered in the local config.
test_expect_success 'do partial clone 1' '
git clone --no-checkout --filter=blob:none "file://$(pwd)/srv.bare" pc1 &&
- git -C pc1 rev-list HEAD --quiet --objects --missing=print \
- | awk -f print_1.awk \
- | sed "s/?//" \
- | sort >observed.oids &&
+
+ git -C pc1 rev-list HEAD --quiet --objects --missing=print |
+ awk -f print_1.awk |
+ sed "s/?//" |
+ sort >observed.oids &&
+
test_cmp expect_1.oids observed.oids &&
test "$(git -C pc1 config --local core.repositoryformatversion)" = "1" &&
test "$(git -C pc1 config --local extensions.partialclone)" = "origin" &&
@@ -130,16 +132,20 @@ test_expect_success 'push new commits to server for file.3.txt' '
# perhaps combined with a command in dry-run mode.
test_expect_success 'manual prefetch of missing objects' '
git -C pc1 fetch --filter=blob:none origin &&
- git -C pc1 rev-list master..origin/master --quiet --objects --missing=print \
- | awk -f print_1.awk \
- | sed "s/?//" \
- | sort >observed.oids &&
+
+ git -C pc1 rev-list master..origin/master --quiet --objects --missing=print |
+ awk -f print_1.awk |
+ sed "s/?//" |
+ sort >observed.oids &&
+
test_line_count = 6 observed.oids &&
git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" <observed.oids &&
- git -C pc1 rev-list master..origin/master --quiet --objects --missing=print \
- | awk -f print_1.awk \
- | sed "s/?//" \
- | sort >observed.oids &&
+
+ git -C pc1 rev-list master..origin/master --quiet --objects --missing=print |
+ awk -f print_1.awk |
+ sed "s/?//" |
+ sort >observed.oids &&
+
test_line_count = 0 observed.oids
'
@@ -194,7 +200,7 @@ test_expect_success 'upon cloning, check that all refs point to objects' '
# Craft a packfile not including that blob.
git -C "$SERVER" rev-parse HEAD |
- git -C "$SERVER" pack-objects --stdout >incomplete.pack &&
+ git -C "$SERVER" pack-objects --stdout >incomplete.pack &&
# Replace the existing packfile with the crafted one. The protocol
# requires that the packfile be sent in sideband 1, hence the extra