diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index 419a69b507d78a830f4d865def6ac012084151d5..f88e7219367c309dbc3d3e7ce2db32666703a91d 100644 (file)
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
* 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;
- nargv[nargc++] = "git-archive";
+ nargv[nargc++] = "archive";
nargv[nargc++] = "--format=tar";
if (2 <= argc && !prefixcmp(argv[1], "--remote=")) {
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);