summaryrefslogtreecommitdiff
path: root/tests/tests/multisuite
blob: fe655d02b62ce14a61180515e19afb4dcded1563 (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
#!/bin/bash
set -e
. tests/lib

t-setup-import examplegit
t-tstunt-parsechangelog

cd $p

rsta=$(t-git-get-ref refs/remotes/dgit/dgit/stable)
rsid=$(t-git-get-ref refs/remotes/dgit/dgit/sid)

multi-good () {
	t-refs-same-start
	t-refs-same refs/remotes/dgit/dgit/stable
	t-ref-same-val "previous stable" $rsta

	t-refs-same-start
	t-refs-same refs/remotes/dgit/dgit/sid
	t-ref-same-val "previous sid" $rsid

	t-refs-same-start
	t-refs-same refs/remotes/dgit/dgit/stable,sid
	t-ref-same-val "previous combined" $rcombined
}

t-dgit fetch stable,unstable

rcombined=$(t-git-get-ref refs/remotes/dgit/dgit/stable,sid)

multi-good

cd ..

t-dgit clone $p stable,unstable ./$p.clone

cd $p.clone

multi-good

t-commit bogus 3.0 stable,unstable
t-expect-fail "does not support multiple" \
t-dgit -wgf build

cd ..

t-dgit clone --no-rm-on-error $p stable ./$p.pull
cd $p.pull
git checkout -b x
git commit --allow-empty -m X
t-dgit pull stable,unstable

multi-good

t-has-parent-or-is HEAD $rcombined

t-ok