oneway_merge(): only lstat() when told to update worktree
[gitweb.git] / t / t1506-rev-parse-diagnosis.sh
index e81dcd6de6639227e5e74a978aa193286e449ec8..f950c101287c2f05bbd70c1faffbcf2cda1edbee 100755 (executable)
@@ -174,7 +174,7 @@ test_expect_success 'relative path when startup_info is NULL' '
 test_expect_success '<commit>:file correctly diagnosed after a pathname' '
        test_must_fail git rev-parse file.txt HEAD:file.txt 1>actual 2>error &&
        test_i18ngrep ! "exists on disk" error &&
-       test_i18ngrep "unknown revision or path not in the working tree" error &&
+       test_i18ngrep "no such path in the working tree" error &&
        cat >expect <<-\EOF &&
        file.txt
        HEAD:file.txt
@@ -182,4 +182,18 @@ test_expect_success '<commit>:file correctly diagnosed after a pathname' '
        test_cmp expect actual
 '
 
+test_expect_success 'dotdot is not an empty set' '
+       ( H=$(git rev-parse HEAD) && echo $H && echo ^$H ) >expect &&
+
+       git rev-parse HEAD.. >actual &&
+       test_cmp expect actual &&
+
+       git rev-parse ..HEAD >actual &&
+       test_cmp expect actual &&
+
+       echo .. >expect &&
+       git rev-parse .. >actual &&
+       test_cmp expect actual
+'
+
 test_done