diff options
author | Petr Baudis <pasky@ucw.cz> | 2005-04-13 02:28:48 -0700 |
---|---|---|
committer | Petr Baudis <xpasky@machine> | 2005-04-13 02:28:48 -0700 |
commit | 2de381f919829aec1e35d6c7cc33519295dcd053 (patch) | |
tree | 3f703cd0cd32a4aa9892bda84c664c36e40f7921 /write-tree.c | |
parent | bdd4da595a265a091a859754a22688f7351cddee (diff) | |
download | git-2de381f919829aec1e35d6c7cc33519295dcd053.tar.gz |
[PATCH] Consolidate the error handling
Now there is error() for "library" errors and die() for fatal "application"
errors. usage() is now used strictly only for usage errors.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Diffstat (limited to 'write-tree.c')
-rw-r--r-- | write-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/write-tree.c b/write-tree.c index 7eac1df8fb..881c8c2b58 100644 --- a/write-tree.c +++ b/write-tree.c @@ -106,9 +106,9 @@ int main(int argc, char **argv) unsigned char sha1[20]; if (entries <= 0) - usage("no cache contents to write"); + die("write-tree: no cache contents to write"); if (write_tree(active_cache, entries, "", 0, sha1) != entries) - usage("write-tree: internal error"); + die("write-tree: internal error"); printf("%s\n", sha1_to_hex(sha1)); return 0; } |