summaryrefslogtreecommitdiff
path: root/tests/tests/gdr-merge
blob: 25b2ee0a22f20fe23ce6865c0eee3381bc5ca050 (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
#!/bin/bash
set -e
autoimport=
. tests/lib

t-dependencies NO-DGIT GDR

t-tstunt-parsechangelog
t-setup-import gdr-convert-gbp-noarchive

: 'set up so t-git-debrebase runs gdr via git'

case "$DGIT_GITDEBREBASE_TEST" in
''|git-debrebase)	;;
*)
	t-tstunt
	st=$tmp/tstunt/git-debrebase
	export DGIT_GITDEBREBASE_TEST_REAL="$DGIT_GITDEBREBASE_TEST"
	cat <<'END' >$st
#!/bin/sh
set -x
exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@"
END
	chmod +x $st
	;;
esac

DGIT_GITDEBREBASE_TEST='git debrebase'

: 'do a simple test'

cd $p

t-gdr-prep-new-upstream 2.1
git tag v2.1 upstream

t-some-changes before
t-git-debrebase quick

git checkout -b other
t-some-changes other '' -other

git checkout master
t-some-changes us-1 '' -us
t-git-debrebase new-upstream 2.1
t-some-changes us-2 '' -us
t-git-debrebase quick

git merge other

t-expect-fail E:'general two-parent merge' \
t-git-debrebase

export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1

t-git-debrebase
t-git-debrebase scrap

t-some-changes after
t-git-debrebase

# xxx want to check that we DTRT if we start out unstitched -
# xxx should consider our ffq-prev as a parent
# xxx or should we ?  it's not a parent of the merge is it ?
# xxx => user should prefer to make merges when stitched ?
# xxx think about this later

# t-gdr-good laundered
# xxx ^ this does not work

t-ok