X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-tar-tree.c;h=f88e7219367c309dbc3d3e7ce2db32666703a91d;hb=003b33a8;hp=0713bca778e7be18b58ec5d207dc7c8cd7e982ed;hpb=310d188f7e1d1fbbeace17d5c62e422fd0b5a824;p=git.git diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c index 0713bca77..f88e72193 100644 --- a/builtin-tar-tree.c +++ b/builtin-tar-tree.c @@ -24,7 +24,7 @@ int cmd_tar_tree(int argc, const char **argv, const char *prefix) * git archive --format-tar --prefix=basedir tree-ish */ int i; - const char **nargv = xcalloc(sizeof(*nargv), argc + 2); + const char **nargv = xcalloc(sizeof(*nargv), argc + 3); char *basedir_arg; int nargc = 0; @@ -36,6 +36,13 @@ int cmd_tar_tree(int argc, const char **argv, const char *prefix) argv++; argc--; } + + /* + * Because it's just a compatibility wrapper, tar-tree supports only + * the old behaviour of reading attributes from the work tree. + */ + nargv[nargc++] = "--worktree-attributes"; + switch (argc) { default: usage(tar_tree_usage);