]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1506-rev-parse-diagnosis.sh
contrib/ciabot: Get ciabot configuration from git variables
[thirdparty/git.git] / t / t1506-rev-parse-diagnosis.sh
index 0843a1c13b3e1458418ee59c548e5441f113bbe7..c5cb77a0e1f34ac46dd8727341948389624e8f38 100755 (executable)
@@ -171,4 +171,15 @@ test_expect_success 'relative path when startup_info is NULL' '
        grep "BUG: startup_info struct is not initialized." error
 '
 
+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 "no such path in the working tree" error &&
+       cat >expect <<-\EOF &&
+       file.txt
+       HEAD:file.txt
+       EOF
+       test_cmp expect actual
+'
+
 test_done