projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Consolidate the error handling
[git.git]
/
write-tree.c
diff --git
a/write-tree.c
b/write-tree.c
index
7eac1df
..
881c8c2
100644
(file)
--- 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)
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)
if (write_tree(active_cache, entries, "", 0, sha1) != entries)
-
usag
e("write-tree: internal error");
+
di
e("write-tree: internal error");
printf("%s\n", sha1_to_hex(sha1));
return 0;
}
printf("%s\n", sha1_to_hex(sha1));
return 0;
}