Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'pb/maint-perl-errmsg-no-dir'
[gitweb.git]
/
builtin
/
cat-file.c
diff --git
a/builtin/cat-file.c
b/builtin/cat-file.c
index a933eaa043257c84f35e1d86728ca91be035caff..e5118c57da2b69963894ff2994ac361ab7f6b837 100644
(file)
--- a/
builtin/cat-file.c
+++ b/
builtin/cat-file.c
@@
-118,7
+118,9
@@
static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
/* custom pretty-print here */
if (type == OBJ_TREE) {
- const char *ls_args[3] = {"ls-tree", obj_name, NULL};
+ const char *ls_args[3] = { NULL };
+ ls_args[0] = "ls-tree";
+ ls_args[1] = obj_name;
return cmd_ls_tree(2, ls_args, NULL);
}