git commit --interactive creates empty commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

is it expected that this test fails?

diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index c0288f3..2c21428 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -123,6 +123,18 @@ test_expect_success \
 	"interactive add" \
 	"echo 7 | git-commit --interactive | grep 'What now'"
 
+cat >editor <<\EOF
+#!/bin/sh
+echo invalid commit > $1
+EOF
+chmod 755 editor
+
+test_expect_success \
+	"interactive fails on empty index" \
+	"export VISUAL=./editor && 
+	test_must_fail git commit --interactive < /dev/null &&
+	unset VISUAL"
+
 test_expect_success \
 	"showing committed revisions" \
 	"git-rev-list HEAD >current"

Bye, Jörg.
-- 
Damit das Mögliche entsteht, muß immer wieder das Unmögliche versucht
werden.                                       (Hermann Hesse)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux