Merge branch 'jc/post-c89-rules-doc' into maint
[gitweb.git] / t / t5318-commit-graph.sh
index 840ad4d8accbfef59e2c9ade82105cc717f6866c..5267c4be20e709bb1632c5b9786ffdb418bcb5c9 100755 (executable)
@@ -23,6 +23,14 @@ test_expect_success 'write graph with no packs' '
        test_path_is_file info/commit-graph
 '
 
+test_expect_success 'close with correct error on bad input' '
+       cd "$TRASH_DIRECTORY/full" &&
+       echo doesnotexist >in &&
+       { git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
+       test "$ret" = 1 &&
+       test_i18ngrep "error adding pack" stderr
+'
+
 test_expect_success 'create commits and repack' '
        cd "$TRASH_DIRECTORY/full" &&
        for i in $(test_seq 3)