diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index 0713bca778e7be18b58ec5d207dc7c8cd7e982ed..8b3a35e12da2cca8b632d4139bc2c5ba2409d322 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;
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);
n = write_in_full(1, content + 11, 41);
if (n < 41)
- die("git get-tar-commit-id: write error");
+ die_errno("git get-tar-commit-id: write error");
return 0;
}