X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-tree.c;h=102b12555b01ca7e7855e72479b062088e9f3b29;hb=2de381f919829aec1e35d6c7cc33519295dcd053;hp=05c743ab6ab3a779c027eaa77e104d188ac0b698;hpb=bdd4da595a265a091a859754a22688f7351cddee;p=git.git diff --git a/ls-tree.c b/ls-tree.c index 05c743ab..102b1255 100644 --- a/ls-tree.c +++ b/ls-tree.c @@ -13,9 +13,9 @@ static int list(unsigned char *sha1) buffer = read_sha1_file(sha1, type, &size); if (!buffer) - usage("unable to read sha1 file"); + die("unable to read sha1 file"); if (strcmp(type, "tree")) - usage("expected a 'tree' node"); + die("expected a 'tree' node"); while (size) { int len = strlen(buffer)+1; unsigned char *sha1 = buffer + len; @@ -24,7 +24,7 @@ static int list(unsigned char *sha1) unsigned char *type; if (size < len + 20 || sscanf(buffer, "%o", &mode) != 1) - usage("corrupt 'tree' file"); + die("corrupt 'tree' file"); buffer = sha1 + 20; size -= len + 20; /* XXX: We do some ugly mode heuristics here. @@ -48,6 +48,6 @@ int main(int argc, char **argv) if (!sha1_file_directory) sha1_file_directory = DEFAULT_DB_ENVIRONMENT; if (list(sha1) < 0) - usage("list failed"); + die("list failed"); return 0; }