Skip to content

Commit bab5583

Browse files
Alexey NezhdanovLinus Torvalds
authored andcommitted
[PATCH] git-export complains about mising cat-file
Fixes bits leaved during name change. Signed-off-by: Alexey Nezhdanov <snake@penza-gsm.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent b02a26c commit bab5583

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cat-file.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int main(int argc, char **argv)
1313
unsigned long size;
1414

1515
if (argc != 3 || get_sha1(argv[2], sha1))
16-
usage("cat-file [-t | tagname] <sha1>");
16+
usage("git-cat-file [-t | tagname] <sha1>");
1717

1818
if (!strcmp("-t", argv[1])) {
1919
buf = read_sha1_file(sha1, type, &size);
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
2828
}
2929

3030
if (!buf)
31-
die("cat-file %s: bad file", argv[2]);
31+
die("git-cat-file %s: bad file", argv[2]);
3232

3333
while (size > 0) {
3434
long ret = write(1, buf, size);
@@ -38,9 +38,9 @@ int main(int argc, char **argv)
3838
/* Ignore epipe */
3939
if (errno == EPIPE)
4040
break;
41-
die("cat-file: %s", strerror(errno));
41+
die("git-cat-file: %s", strerror(errno));
4242
} else if (!ret) {
43-
die("cat-file: disk full?");
43+
die("git-cat-file: disk full?");
4444
}
4545
size -= ret;
4646
buf += ret;

export.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void show_commit(struct commit *commit)
1212
strcpy(hex, sha1_to_hex(commit->object.sha1));
1313
printf("Id: %s\n", hex);
1414
fflush(NULL);
15-
sprintf(cmdline, "cat-file commit %s", hex);
15+
sprintf(cmdline, "git-cat-file commit %s", hex);
1616
system(cmdline);
1717
if (commit->parents) {
1818
char *against = sha1_to_hex(commit->parents->item->object.sha1);

0 commit comments

Comments
 (0)