All of lore.kernel.org
 help / color / mirror / Atom feed
* git commit return code
@ 2010-08-09 15:32 Tomasz Pajor
  2010-08-09 16:13 ` Ævar Arnfjörð Bjarmason
  2010-08-10  6:46 ` Matthieu Moy
  0 siblings, 2 replies; 3+ messages in thread
From: Tomasz Pajor @ 2010-08-09 15:32 UTC (permalink / raw)
  To: git

Hello,

Is this proper behaviour:

root# su <username> -c "git commit --quiet -a -m \"templates generation\";"
# On branch master
nothing to commit (working directory clean)
root# echo $?
1

root# git --version
git version 1.7.1

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

* Re: git commit return code
  2010-08-09 15:32 git commit return code Tomasz Pajor
@ 2010-08-09 16:13 ` Ævar Arnfjörð Bjarmason
  2010-08-10  6:46 ` Matthieu Moy
  1 sibling, 0 replies; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-09 16:13 UTC (permalink / raw)
  To: Tomasz Pajor; +Cc: git

On Mon, Aug 9, 2010 at 15:32, Tomasz Pajor <nikon@puffy.pl> wrote:

> Is this proper behaviour:
>
> root# su <username> -c "git commit --quiet -a -m \"templates generation\";"
> # On branch master
> nothing to commit (working directory clean)
> root# echo $?
> 1

Yes, you asked it to create a commit, but there's nothing to commit.
Hence the failure to commit.

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

* Re: git commit return code
  2010-08-09 15:32 git commit return code Tomasz Pajor
  2010-08-09 16:13 ` Ævar Arnfjörð Bjarmason
@ 2010-08-10  6:46 ` Matthieu Moy
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Moy @ 2010-08-10  6:46 UTC (permalink / raw)
  To: Tomasz Pajor; +Cc: git

Tomasz Pajor <nikon@puffy.pl> writes:

> Hello,
>
> Is this proper behaviour:
>
> root# su <username> -c "git commit --quiet -a -m \"templates generation\";"
> # On branch master
> nothing to commit (working directory clean)
> root# echo $?
> 1

The exit status doesn't seem documented in the manpage, but it's
expected behavior that "git commit" refuses to create an empty commit,
and it seems sensible to "exit(1)" in this case.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

end of thread, other threads:[~2010-08-10  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 15:32 git commit return code Tomasz Pajor
2010-08-09 16:13 ` Ævar Arnfjörð Bjarmason
2010-08-10  6:46 ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.