Merge branch 'jh/status-no-ahead-behind'
[gitweb.git] / t / t7607-merge-overwrite.sh
index 9444d6a9b9026748028178c4b66ee8bbbc1d89fa..9c422bcd7cc8c1b2525579ca3a7ffa6ee412ba42 100755 (executable)
@@ -97,7 +97,10 @@ test_expect_failure 'will not overwrite unstaged changes in renamed file' '
        git mv c1.c other.c &&
        git commit -m rename &&
        cp important other.c &&
-       git merge c1a &&
+       test_must_fail git merge c1a >out &&
+       test_i18ngrep "Refusing to lose dirty file at other.c" out &&
+       test_path_is_file other.c~HEAD &&
+       test $(git hash-object other.c~HEAD) = $(git rev-parse c1a:c1.c) &&
        test_cmp important other.c
 '