Re: Possible bug in 'git status' exit code is 1 instead of 0

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Possible bug in 'git status' exit code is 1 instead of 0

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:48

"Marco Costalba" [off-list ref] writes:
bash-3.1$ pwd
/home/marco/programmi/git
bash-3.1$ git status; echo $?
# On branch refs/heads/origin
nothing to commit (use "git add file1 file2" to include for commit)
1
bash-3.1$ git --version
git version 1.5.0.rc0.g244a7
I think that's normal and has been the way for git-commit to
detect if there is anything to commit.

Re: Possible bug in 'git status' exit code is 1 instead of 0

From: Marco Costalba <hidden>
Date: 2016-06-15 22:42:48

On 1/9/07, Junio C Hamano [off-list ref] wrote:
"Marco Costalba" [off-list ref] writes:
quoted
bash-3.1$ pwd
/home/marco/programmi/git
bash-3.1$ git status; echo $?
# On branch refs/heads/origin
nothing to commit (use "git add file1 file2" to include for commit)
1
bash-3.1$ git --version
git version 1.5.0.rc0.g244a7
I think that's normal and has been the way for git-commit to
detect if there is anything to commit.
Ok, I was changing the error detection to check exit status, but it's
definitely better to still check for something written to stdErr
instead.

Thanks
Marco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help