blob: 6fb822a784dbbf87460d87c90e548d5c5504c1d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# file : tests/rep-fetch-git.testscript
# license : MIT; see accompanying LICENSE file
# All tests use the same repository infrastructure present in the initial and
# the final states. See tests/common/git/init script for more details.
#
reason_dumb = ' (dumb HTTP)'
reason_unadv = ' (unadvertised commit)'
info_dumb='
info: no progress will be shown (dumb HTTP)'
info_repo_hist = "info: fetching whole repository history"
info_ref_hist = "info: fetching whole reference history"
info = '%.{0}' # None.
test.cleanups += &cfg/.bpkg/repos/*/***
+if ($git_protocol == 'local')
rep = "$rep_git_local"
elif ($git_protocol == 'https-dumb')
rep = "$rep_git_https_dumb"
elif ($git_protocol == 'https-smart')
rep = "$rep_git_https_smart"
elif ($git_protocol == 'https-smart-unadv')
rep = "$rep_git_https_smart_unadv"
elif ($git_protocol == 'git')
rep = "$rep_git_git"
elif ($git_protocol == 'git-unadv')
rep = "$rep_git_git_unadv"
elif ($git_protocol == 'ssh')
rep = "$rep_git_ssh"
elif ($git_protocol == 'ssh-unadv')
rep = "$rep_git_ssh_unadv"
else
exit "unexpected git protocol '$git_protocol'"
end
# Repository URL prefix for use with git commands.
#
# Note that git supports none of the standard 'file:' URL notations on Windows,
# so we produce one that is acceptable for git.
#
+if ($git_protocol == 'local' && $cxx.target.class == 'windows')
rep_git = "$regex.replace($rep, '^file:/', 'file://')"
else
rep_git = "$rep"
end
: branch
:
{
fragment = '#master'
.include rep-fetch-git-refname.testscript
}
: ltag
:
{
fragment = '#ltag'
.include rep-fetch-git-refname.testscript
}
: atag
:
{
fragment = '#atag'
.include rep-fetch-git-refname.testscript
}
: list
:
{
fragment = '#master,ltag,atag'
.include rep-fetch-git-refname.testscript
}
: commit
:
{
.include rep-fetch-git-commit.testscript
}
|