diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 76ec3fec9279f38520fa4b5b525ce2c03cc9cbb0..07bd984084fbbfbb826ef5b784fc68069675e73c 100644 (file)
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
die("git cat-file --textconv %s: <object> must be <sha1:path>",
obj_name);
- if (!textconv_object(obj_context.path, sha1, &buf, &size))
+ if (!textconv_object(obj_context.path, obj_context.mode, sha1, &buf, &size))
die("git cat-file --textconv: unable to run textconv on %s",
obj_name);
break;
if (type <= 0) {
printf("%s missing\n", obj_name);
fflush(stdout);
+ if (print_contents == BATCH)
+ free(contents);
return 0;
}