{"thread":{"id":"13100","subject":"git commit --interactive creates empty commits","startedAt":"2008-04-14T00:35:47Z","lastAt":"2008-04-14T07:01:45Z","messageCount":2,"participants":["Jörg Sommer","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"74286","messageId":"slrng059n3.nd8.joerg@alea.gnuu.de","threadId":"13100","inReplyTo":null,"subject":"git commit --interactive creates empty commits","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-04-14T00:35:47Z","receivedAt":"2008-04-14T00:35:47Z","isPatch":false,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi,\n\nis it expected that this test fails?\n\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex c0288f3..2c21428 100755\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -123,6 +123,18 @@ test_expect_success \\\n \t\"interactive add\" \\\n \t\"echo 7 | git-commit --interactive | grep 'What now'\"\n \n+cat >editor <<\\EOF\n+#!/bin/sh\n+echo invalid commit > $1\n+EOF\n+chmod 755 editor\n+\n+test_expect_success \\\n+\t\"interactive fails on empty index\" \\\n+\t\"export VISUAL=./editor && \n+\ttest_must_fail git commit --interactive < /dev/null &&\n+\tunset VISUAL\"\n+\n test_expect_success \\\n \t\"showing committed revisions\" \\\n \t\"git-rev-list HEAD >current\"\n\nBye, Jörg.\n-- \nDamit das Mögliche entsteht, muß immer wieder das Unmögliche versucht\nwerden.                                       (Hermann Hesse)\n"},{"id":"74320","messageId":"7vk5j0apie.fsf@gitster.siamese.dyndns.org","threadId":"13100","inReplyTo":"slrng059n3.nd8.joerg@alea.gnuu.de","subject":"Re: git commit --interactive creates empty commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-14T07:01:45Z","receivedAt":"2008-04-14T07:01:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jörg Sommer <joerg@alea.gnuu.de> writes:\n\n> is it expected that this test fails?\n\nI think you spotted a bug ;-)  -i should only affect the way how you build\nthe index.  Unless the user does not ask for --allow-empty this should be\nprevented, I think.\n\n> diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\n> index c0288f3..2c21428 100755\n> --- a/t/t7501-commit.sh\n> +++ b/t/t7501-commit.sh\n> @@ -123,6 +123,18 @@ test_expect_success \\\n>  \t\"interactive add\" \\\n>  \t\"echo 7 | git-commit --interactive | grep 'What now'\"\n>  \n> +cat >editor <<\\EOF\n> +#!/bin/sh\n> +echo invalid commit > $1\n> +EOF\n> +chmod 755 editor\n> +\n> +test_expect_success \\\n> +\t\"interactive fails on empty index\" \\\n> +\t\"export VISUAL=./editor && \n> +\ttest_must_fail git commit --interactive < /dev/null &&\n> +\tunset VISUAL\"\n> +\n"}]}