summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index a933eaa043..e5118c57da 100644
--- 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);
}