projects
/
platform
/
upstream
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.13.2
[platform/upstream/git.git]
/
builtin
/
cat-file.c
diff --git
a/builtin/cat-file.c
b/builtin/cat-file.c
index
9af863e
..
73c81f0
100644
(file)
--- a/
builtin/cat-file.c
+++ b/
builtin/cat-file.c
@@
-61,7
+61,8
@@
static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
if (unknown_type)
flags |= LOOKUP_UNKNOWN_OBJECT;
if (unknown_type)
flags |= LOOKUP_UNKNOWN_OBJECT;
- if (get_sha1_with_context(obj_name, 0, oid.hash, &obj_context))
+ if (get_sha1_with_context(obj_name, GET_SHA1_RECORD_PATH,
+ oid.hash, &obj_context))
die("Not a valid object name %s", obj_name);
if (!path)
die("Not a valid object name %s", obj_name);
if (!path)
@@
-166,6
+167,7
@@
static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
write_or_die(1, buf, size);
free(buf);
write_or_die(1, buf, size);
free(buf);
+ free(obj_context.path);
return 0;
}
return 0;
}