Code

t7600 (merge): check reflog entry
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 17 Aug 2010 06:56:13 +0000 (01:56 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Aug 2010 21:02:03 +0000 (14:02 -0700)
The details of the reflog message are not important, but
including something sane in the reflog is.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7600-merge.sh

index 64a4265cfcdcfa79085328308509ad60b113c0e2..6e839a609c7fa255b2b48737ec446aebdb5e86b7 100755 (executable)
@@ -149,10 +149,16 @@ test_expect_success 'reject non-strategy with a git-merge-foo name' '
 '
 
 test_expect_success 'merge c0 with c1' '
+       echo "OBJID HEAD@{0}: merge c1: Fast-forward" >reflog.expected &&
+
        git reset --hard c0 &&
        git merge c1 &&
        verify_merge file result.1 &&
-       verify_head "$c1"
+       verify_head "$c1" &&
+
+       git reflog -1 >reflog.actual &&
+       sed "s/$_x05[0-9a-f]*/OBJID/g" reflog.actual >reflog.fuzzy &&
+       test_cmp reflog.expected reflog.fuzzy
 '
 
 test_debug 'git log --graph --decorate --oneline --all'