Re: git commit return code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tomasz Pajor <nikon@xxxxxxxx> 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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]