t3430: avoid hard-coded object IDs

Compute the object IDs used in the todo list instead of hard-coding them. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Aug 18, 2019 at 19:16 UTC 9a6738c061ad89216d6bf0ca9472c9be5dcb8155
1 file changed +15 -8
t/t3430-rebase-merges.sh
+15 -8
@@ -37,20 +37,27 @@ test_expect_success 'setup' '
37 test_commit A &&
38 git checkout -b first &&
39 test_commit B &&
40 + b=$(git rev-parse --short HEAD) &&
41 git checkout master &&
42 test_commit C &&
43 + c=$(git rev-parse --short HEAD) &&
44 test_commit D &&
45 + d=$(git rev-parse --short HEAD) &&
46 git merge --no-commit B &&
47 test_tick &&
48 git commit -m E &&
49 git tag -m E E &&
50 + e=$(git rev-parse --short HEAD) &&
51 git checkout -b second C &&
52 test_commit F &&
53 + f=$(git rev-parse --short HEAD) &&
54 test_commit G &&
55 + g=$(git rev-parse --short HEAD) &&
56 git checkout master &&
57 git merge --no-commit G &&
58 test_tick &&
59 git commit -m H &&
60 + h=$(git rev-parse --short HEAD) &&
61 git tag -m H H &&
62 git checkout A &&
63 test_commit conflicting-G G.t
@@ -93,24 +100,24 @@ test_expect_success 'create completely different structure' '
100 '
101
102 test_expect_success 'generate correct todo list' '
96 - cat >expect <<-\EOF &&
103 + cat >expect <<-EOF &&
104 label onto
105
106 reset onto
100 - pick d9df450 B
107 + pick $b B
108 label E
109
110 reset onto
104 - pick 5dee784 C
111 + pick $c C
112 label branch-point
106 - pick ca2c861 F
107 - pick 088b00a G
113 + pick $f F
114 + pick $g G
115 label H
116
117 reset branch-point # C
111 - pick 12bd07b D
112 - merge -C 2051b56 E # E
113 - merge -C 233d48a H # H
118 + pick $d D
119 + merge -C $e E # E
120 + merge -C $h H # H
121
122 EOF
123