threads / patch / 29339

patcht2203: fix wrong commit command

Subject: [PATCH] t2203: fix wrong commit command

## tl;dr

5 messages between Jan 11, 2012 and Jan 11, 2012. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Nguyễn Thái Ngọc Duy· Jan 11, 2012, 03:21 UTC · lore

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(-)
Show changes to t/t2203-add-intent.sh +1 −1
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· Jan 11, 2012, 04:21 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH] t2203: fix wrong commit command

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· Jan 11, 2012, 04:43 UTC · re: Ramkumar Ramachandra · lore

Re: [PATCH] t2203: fix wrong commit command

2012/1/11 Ramkumar Ramachandra <artagnon@gmail.com>:
Show 9 quoted lines
> 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· Jan 11, 2012, 04:43 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: [PATCH] t2203: fix wrong commit command

On Wed, Jan 11, 2012 at 11:43 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:

Show 12 quoted lines
> 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

← back to recent threads