t7102 (reset): don't hardcode SHA-1 in expected outputs
The expected SHA-1 digests are always available in variables. Use them instead of hardcoding. Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin committed
Jun 26, 2013 at 14:19 UTC
375775bb1289a0b78f26b8ec08627fd133920ab9
1 file changed
+5
-3
t/t7102-reset.sh
+5
-3
@@ -192,7 +192,8 @@ test_expect_success \
192
'changing files and redo the last commit should succeed' '
193
echo "3rd line 2nd file" >>secondfile &&
194
git commit -a -C ORIG_HEAD &&
195
- check_changes 3d3b7be011a58ca0c179ae45d94e6c83c0b0cd0d &&
195
+ head4=$(git rev-parse --verify HEAD) &&
196
+ check_changes $head4 &&
197
test "$(git rev-parse ORIG_HEAD)" = \
198
$head5
199
'
@@ -211,7 +212,7 @@ test_expect_success \
212
git reset --hard HEAD~2 &&
213
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
214
test "$(git rev-parse ORIG_HEAD)" = \
214
- 3d3b7be011a58ca0c179ae45d94e6c83c0b0cd0d
215
+ $head4
216
'
217
218
>.diff_expect
@@ -326,10 +327,11 @@ test_expect_success '--hard reset to HEAD should clear a failed merge' '
327
git checkout branch2 &&
328
echo "3rd line in branch2" >>secondfile &&
329
git commit -a -m "change in branch2" &&
330
+ head3=$(git rev-parse --verify HEAD) &&
331
332
test_must_fail git pull . branch1 &&
333
git reset --hard &&
332
- check_changes 77abb337073fb4369a7ad69ff6f5ec0e4d6b54bb
334
+ check_changes $head3
335
'
336
337
>.diff_expect