# [PATCH] t2203: fix wrong commit command

5 messages from 2012-01-11 to 2012-01-11. Participants: Nguyễn Thái Ngọc Duy, Ramkumar Ramachandra, Nguyen Thai Ngoc Duy, Junio C Hamano.
Thread: https://gitlist.dev/t/29339

## Nguyễn Thái Ngọc Duy, 2012-01-11 03:21

Subject: [PATCH] t2203: fix wrong commit command
Message-ID: <1326252098-2891-1-git-send-email-pclouds@gmail.com>
URL: https://gitlist.dev/e/1326252098-2891-1-git-send-email-pclouds%40gmail.com

```
Add commit message to avoid commit's aborting due to the lack of
commit message, not because there are INTENT_TO_ADD entries in index.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 t/t2203-add-intent.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index 58a3299..2543529 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -41,7 +41,7 @@ test_expect_success 'cannot commit with i-t-a entry' '
 	echo frotz >nitfol &&
 	git add rezrov &&
 	git add -N nitfol &&
-	test_must_fail git commit
+	test_must_fail git commit -m initial
 '
 
 test_expect_success 'can commit with an unrelated i-t-a entry in index' '
-- 
1.7.3.1.256.g2539c.dirty

```

## Ramkumar Ramachandra, 2012-01-11 04:21

Subject: Re: [PATCH] t2203: fix wrong commit command
Message-ID: <CALkWK0kDBFvssyX2ZPJ9WNzfNXD=wEJoXTRVpFWm1TDKJrvNzA@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0kDBFvssyX2ZPJ9WNzfNXD%3DwEJoXTRVpFWm1TDKJrvNzA%40mail.gmail.com
In-Reply-To: <1326252098-2891-1-git-send-email-pclouds@gmail.com>

```
Hi Duy,

Nguyễn Thái Ngọc Duy wrote:
> Add commit message to avoid commit's aborting due to the lack of
> commit message, not because there are INTENT_TO_ADD entries in index.

Is there any way to differentiate between the two kinds of errors, so
that we can avoid this in the future?  Can we grep the error message
for something, or inspect the exit status?

-- Ram

```

## Nguyen Thai Ngoc Duy, 2012-01-11 04:43

Subject: Re: [PATCH] t2203: fix wrong commit command
Message-ID: <CACsJy8CjWBRtj3x3guyu-iJeTYxcRriXKbE=Be-rG=Rmesgt=g@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8CjWBRtj3x3guyu-iJeTYxcRriXKbE%3DBe-rG%3DRmesgt%3Dg%40mail.gmail.com
In-Reply-To: <CALkWK0kDBFvssyX2ZPJ9WNzfNXD=wEJoXTRVpFWm1TDKJrvNzA@mail.gmail.com>

```
2012/1/11 Ramkumar Ramachandra <artagnon@gmail.com>:
> Hi Duy,
>
> Nguyễn Thái Ngọc Duy wrote:
>> Add commit message to avoid commit's aborting due to the lack of
>> commit message, not because there are INTENT_TO_ADD entries in index.
>
> Is there any way to differentiate between the two kinds of errors, so
> that we can avoid this in the future?  Can we grep the error message
> for something, or inspect the exit status?

commit exits with 1 in both cases, so no.
-- 
Duy

```

## Nguyen Thai Ngoc Duy, 2012-01-11 04:43

Subject: Re: [PATCH] t2203: fix wrong commit command
Message-ID: <CACsJy8Dkcj4Vbow29SBW52JKu7bkEWzk_S=rTrG+fdxiD0w7xw@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8Dkcj4Vbow29SBW52JKu7bkEWzk_S%3DrTrG%2BfdxiD0w7xw%40mail.gmail.com
In-Reply-To: <CACsJy8CjWBRtj3x3guyu-iJeTYxcRriXKbE=Be-rG=Rmesgt=g@mail.gmail.com>

```
On Wed, Jan 11, 2012 at 11:43 AM, Nguyen Thai Ngoc Duy
<pclouds@gmail.com> wrote:
> 2012/1/11 Ramkumar Ramachandra <artagnon@gmail.com>:
>> Hi Duy,
>>
>> Nguyễn Thái Ngọc Duy wrote:
>>> Add commit message to avoid commit's aborting due to the lack of
>>> commit message, not because there are INTENT_TO_ADD entries in index.
>>
>> Is there any way to differentiate between the two kinds of errors, so
>> that we can avoid this in the future?  Can we grep the error message
>> for something, or inspect the exit status?
>
> commit exits with 1 in both cases, so no.

but grepping error message should work, sorry I hit send too fast
-- 
Duy

```

## Junio C Hamano, 2012-01-11 08:09

Subject: Re: [PATCH] t2203: fix wrong commit command
Message-ID: <7vmx9u7j92.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vmx9u7j92.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1326252098-2891-1-git-send-email-pclouds@gmail.com>

```
Thanks.

```
