aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-09 00:28:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-09 00:28:24 +0300
commitf1c95d45bd86180ef64da018b657461c44d0236a (patch)
tree27c31b4754994f1e02deb8938c0a0863ddc16096 /tests
parent19a6eb42669c2d380d0bb045fe1240b1589e9ad2 (diff)
Fix git repository fetch that was deep regardless of the sensing result
Diffstat (limited to 'tests')
-rw-r--r--tests/rep-fetch-git-refname.testscript9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript
index e273569..71305ea 100644
--- a/tests/rep-fetch-git-refname.testscript
+++ b/tests/rep-fetch-git-refname.testscript
@@ -92,6 +92,15 @@
checked out libfoo/1.0.0
EOE
+ # While at it, check that the fetch was shallow (and the repository
+ # contains a single commit), unless the protocol is dumb.
+ #
+ if ($git_protocol != 'https-dumb')
+ $g "$r" log '--pretty=format:%d %s' >>:~%EOO%
+ % \(.+\) .+%
+ EOO
+ end;
+
$g "$r" config remote.origin.url "$u/libfoo.git";
# Preconditions.