author | Junio C Hamano <junkio@cox.net> | |
Mon, 5 Mar 2007 08:22:06 +0000 (00:22 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 5 Mar 2007 08:55:19 +0000 (00:55 -0800) | ||
commit | e2b4f63512357d83f1f11bafadb22063e5d56621 | |
tree | 9c928aa80c1e3c565f8ee14a9074dea38efeba46 | tree | snapshot |
parent | 7efbff7531af4281487d54c1dc1401308d988e33 | commit | diff |
fsck: exit with non-zero status upon errors
git-fsck always exited with status 0, which was a bit sloppy.
This makes it exit with a non-zero status when errors are
found. The error code is an OR'ed result of:
1 if corrupted objects are found.
2 if objects that are ought to be reachable are missing or corrupt.
For example, it would exit with 1 in a repository with an
unreachable corrupt object. If a tree object of the HEAD commit
is corrupt, you would get 3.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-fsck always exited with status 0, which was a bit sloppy.
This makes it exit with a non-zero status when errors are
found. The error code is an OR'ed result of:
1 if corrupted objects are found.
2 if objects that are ought to be reachable are missing or corrupt.
For example, it would exit with 1 in a repository with an
unreachable corrupt object. If a tree object of the HEAD commit
is corrupt, you would get 3.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fsck.c | diff | blob | history |