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
/* custom pretty-print here */
if (type == OBJ_TREE) {
/* 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);
}
return cmd_ls_tree(2, ls_args, NULL);
}