git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t2203: fix wrong commit command
@ 2012-01-11  3:21 Nguyễn Thái Ngọc Duy
  2012-01-11  4:21 ` Ramkumar Ramachandra
  2012-01-11  8:09 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2012-01-11  3:21 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] t2203: fix wrong commit command
  2012-01-11  3:21 [PATCH] t2203: fix wrong commit command Nguyễn Thái Ngọc Duy
@ 2012-01-11  4:21 ` Ramkumar Ramachandra
  2012-01-11  4:43   ` Nguyen Thai Ngoc Duy
  2012-01-11  8:09 ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Ramkumar Ramachandra @ 2012-01-11  4:21 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git, Junio C Hamano

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] t2203: fix wrong commit command
  2012-01-11  4:21 ` Ramkumar Ramachandra
@ 2012-01-11  4:43   ` Nguyen Thai Ngoc Duy
  2012-01-11  4:43     ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2012-01-11  4:43 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: git, Junio C Hamano

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] t2203: fix wrong commit command
  2012-01-11  4:43   ` Nguyen Thai Ngoc Duy
@ 2012-01-11  4:43     ` Nguyen Thai Ngoc Duy
  0 siblings, 0 replies; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2012-01-11  4:43 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: git, Junio C Hamano

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] t2203: fix wrong commit command
  2012-01-11  3:21 [PATCH] t2203: fix wrong commit command Nguyễn Thái Ngọc Duy
  2012-01-11  4:21 ` Ramkumar Ramachandra
@ 2012-01-11  8:09 ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2012-01-11  8:09 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-11  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11  3:21 [PATCH] t2203: fix wrong commit command Nguyễn Thái Ngọc Duy
2012-01-11  4:21 ` Ramkumar Ramachandra
2012-01-11  4:43   ` Nguyen Thai Ngoc Duy
2012-01-11  4:43     ` Nguyen Thai Ngoc Duy
2012-01-11  8:09 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).