Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git commit return code

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:49:17

Tomasz Pajor [off-list ref] 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help