X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fcat-file.c;h=e5118c57da2b69963894ff2994ac361ab7f6b837;hb=66dbfd55e38128db02eb340fcd89f54b734d4c6e;hp=a933eaa043257c84f35e1d86728ca91be035caff;hpb=96203bb074544a37fcff9c3f2a68582b76caa263;p=git.git diff --git a/builtin/cat-file.c b/builtin/cat-file.c index a933eaa04..e5118c57d 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); }