From f1c95d45bd86180ef64da018b657461c44d0236a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 9 Feb 2019 00:28:24 +0300 Subject: Fix git repository fetch that was deep regardless of the sensing result --- tests/rep-fetch-git-refname.testscript | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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. -- cgit v1.1