aboutsummaryrefslogtreecommitdiff
path: root/tests/rep-fetch-git-commit.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-02-14 00:38:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-02-15 12:12:23 +0300
commitfbc7f6db25c322ea0da0a13d080d07b84f8bc497 (patch)
treec321d0951c17d9d3b9e43ea19a4c5fee27f6e142 /tests/rep-fetch-git-commit.test
parente701a83e8d5d60a3cc3c5e285ddb1fe03d4a0aa5 (diff)
Make git_clone() to abbreviate (16 chars) commit id-based directory name
Diffstat (limited to 'tests/rep-fetch-git-commit.test')
-rw-r--r--tests/rep-fetch-git-commit.test14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/rep-fetch-git-commit.test b/tests/rep-fetch-git-commit.test
index ced0f8f..e2752b6 100644
--- a/tests/rep-fetch-git-commit.test
+++ b/tests/rep-fetch-git-commit.test
@@ -8,7 +8,7 @@ reason_unadv = ' (unadvertised commit)'
warn_dumb='
warning: fetching over dumb HTTP, no progress will be shown'
- +git clone "$rep_git/state0/style-basic.git" 2>! &style-basic/***
++git clone "$rep_git/state0/style-basic.git" 2>! &style-basic/***
: unadvertised
:
@@ -16,6 +16,10 @@ warning: fetching over dumb HTTP, no progress will be shown'
+git -C ../style-basic log '--pretty=format:%H' --all --grep='README' | \
set commit
+ +git -C ../style-basic log '--pretty=format:%h' --all --grep='README' \
+ --abbrev=16 | \
+ set abbr_commit
+
: no-branch
:
{
@@ -23,7 +27,7 @@ warning: fetching over dumb HTTP, no progress will be shown'
if ($git_protocol == 'https-smart-unadv')
warn = '%.{0}'
- fetch = "%Fetching in '.+$commit'.+%"
+ fetch = "%Fetching in '.+$abbr_commit'.+%"
else
warn = "warning: fetching whole repository history"
@@ -39,7 +43,7 @@ warning: fetching over dumb HTTP, no progress will be shown'
$* 2>>~"%EOE%"
%fetching git:.+style-basic%
$warn
- %Cloning into '.+$commit'.+%
+ %Cloning into '.+$abbr_commit'.+%
$fetch
0 package\(s\) in 1 repository\(s\)
EOE
@@ -91,13 +95,13 @@ warning: fetching over dumb HTTP, no progress will be shown'
fetch = '%.{0}'
else
warn = '%.{0}'
- fetch = "%Fetching in '.+$commit'.+%"
+ fetch = "%Fetching in '.+$abbr_commit'.+%"
end;
$* 2>>~"%EOE%"
%fetching git:.+style-basic%
$warn
- %Cloning into '.+$commit'.+%
+ %Cloning into '.+$abbr_commit'.+%
$fetch
0 package\(s\) in 1 repository\(s\)
EOE