summaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-18 00:18:05 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-17 21:05:49 -0700
commitba053ea96c252e04729dcd439e3c35d394d69914 (patch)
tree308bd6c8e28bdab62ddb58fd0013af9a489027c1 /builtin-tar-tree.c
parent66985e6629c4325ec6b1508bf4bda907c2a538cb (diff)
downloadgit-ba053ea96c252e04729dcd439e3c35d394d69914.tar.gz
archive: do not read .gitattributes in working directory
The old behaviour still remains with --worktree-attributes, and it is always on for the legacy "git tar-tree". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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);