git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Next problem: cg-commit
@ 2005-04-29 20:51 Russell King
  2005-05-02 22:30 ` Petr Baudis
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2005-04-29 20:51 UTC (permalink / raw)
  To: git

Unfortunately, cg-commit seems to return wrong exit status, returning
1 on success.  Eg:

$ cg-commit
arch/arm/mach-ixp2000/pci.c
include/asm-arm/arch-ixp2000/platform.h
Enter commit message, terminated by ctrl-D on a separate line:
blah blah blah
Committed as fafb525292acc9c0818b91b1d8e58cf770616542.
$ echo $?
1

It appears that [ "$merging" ] towards the end of cg-commit is the
cause of this odd behaviour.  Force zero exit status, since we
successfully completed.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>

--- cg-commit.old	2005-04-26 04:02:01.000000000 +0100
+++ cg-commit	2005-04-29 21:47:57.161333483 +0100
@@ -114,6 +114,7 @@
 	echo "Committed as $newhead."
 	echo $newhead >.git/HEAD
 	[ "$merging" ] && rm .git/merging .git/merging-sym .git/merge-base
+	exit 0
 else
 	die "error during commit (oldhead $oldhead, treeid $treeid)"
 fi


-- 
Russell King


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

* Re: Next problem: cg-commit
  2005-04-29 20:51 Next problem: cg-commit Russell King
@ 2005-05-02 22:30 ` Petr Baudis
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-05-02 22:30 UTC (permalink / raw)
  To: Russell King; +Cc: git

Dear diary, on Fri, Apr 29, 2005 at 10:51:18PM CEST, I got a letter
where Russell King <rmk@arm.linux.org.uk> told me that...
> Unfortunately, cg-commit seems to return wrong exit status, returning
> 1 on success.  Eg:
> 
> $ cg-commit
> arch/arm/mach-ixp2000/pci.c
> include/asm-arm/arch-ixp2000/platform.h
> Enter commit message, terminated by ctrl-D on a separate line:
> blah blah blah
> Committed as fafb525292acc9c0818b91b1d8e58cf770616542.
> $ echo $?
> 1
> 
> It appears that [ "$merging" ] towards the end of cg-commit is the
> cause of this odd behaviour.  Force zero exit status, since we
> successfully completed.

Nice find, thanks. I added it to few other files too.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

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

end of thread, other threads:[~2005-05-02 22:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-29 20:51 Next problem: cg-commit Russell King
2005-05-02 22:30 ` Petr Baudis

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).