author | Lea Wiemann <lewiemann@gmail.com> | |
Mon, 9 Jun 2008 00:02:21 +0000 (02:02 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Jun 2008 20:46:08 +0000 (13:46 -0700) | ||
commit | 3c076dbe3cffee3b5cbf34759d627c47a417c145 | |
tree | d4d2d86ca6409739f69cec826e6c813a1234672d | tree | snapshot |
parent | 4e44ae45fe96c6972c3e5d4aac2a149972429deb | commit | diff |
cat-file --batch / --batch-check: do not exit if hashes are missing
Previously, cat-file --batch / --batch-check would silently exit if it
was passed a non-existent SHA1 on stdin. Now it prints "<SHA1>
missing" as in all other cases (and as advertised in the
documentation).
Note that cat-file --batch-check (but not --batch) will still output
"error: unable to find <SHA1>" on stderr if a non-existent SHA1 is
passed, but this does not affect parsing its stdout.
Also, type <= 0 was previously using the potentially uninitialized
type variable (relying on it being 0); it is now being initialized.
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previously, cat-file --batch / --batch-check would silently exit if it
was passed a non-existent SHA1 on stdin. Now it prints "<SHA1>
missing" as in all other cases (and as advertised in the
documentation).
Note that cat-file --batch-check (but not --batch) will still output
"error: unable to find <SHA1>" on stderr if a non-existent SHA1 is
passed, but this does not affect parsing its stdout.
Also, type <= 0 was previously using the potentially uninitialized
type variable (relying on it being 0); it is now being initialized.
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-cat-file.c | diff | blob | history | |
t/t1006-cat-file.sh | diff | blob | history |