Stephen Smith [off-list ref] writes:
On Tuesday, February 16, 2016 8:33:54 PM MST Junio C Hamano wrote:
Wow, that's quite an old discussion ;-)
quoted
So if you do this:
$ git reset --hard HEAD
$ >a-new-file && git add a-new-file
$ git commit --dry-run --short; echo $?
you'd get "No, there is nothing interesting to commit", which is
clearly bogus.
I was about to start working on working on this and ran the test you suggested
back in 2016. I don't get the error message from that time period. I
believe that this was fixed.
After these:
$ git reset --hard HEAD
$ >a-new-file && git add a-new-file
running
$ git commit --dry-run; echo $?
$ git commit --dry-run --short; echo $?
tells me that "--short" still does not notice that there _is_
something to be committed, either with an ancient version like
v2.10.5 or more modern versions of Git. The "long" version exits
with 0, while "--short" one exists with 1.
So...?