summaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-04-18 14:46:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-04-18 14:46:08 -0700
commit5758b25da43c401cad33f3304f78084a0305d21c (patch)
treee10e86da5fd7b1c0f13306e289a065bae336e38e /builtin-tar-tree.c
parentMerge branch 'maint' (diff)
parentarchive test: attributes (diff)
downloadtgif-5758b25da43c401cad33f3304f78084a0305d21c.tar.xz
Merge branch 'nd/archive-attribute'
* nd/archive-attribute: archive test: attributes archive: do not read .gitattributes in working directory unpack-trees: do not muck with attributes when we are not checking out attr: add GIT_ATTR_INDEX "direction" archive tests: do not use .gitattributes in working directory
Diffstat (limited to 'builtin-tar-tree.c')
-rw-r--r--builtin-tar-tree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index 0713bca778..f88e721936 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);