{"thread":{"id":"33451","subject":"git-archive --worktree-attributes (1.8.2)","startedAt":"2013-04-09T20:43:32Z","lastAt":"2013-04-10T18:56:21Z","messageCount":5,"participants":["Amit Bakshi","Junio C Hamano","René Scharfe","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"213717","messageId":"CAFGOX=VXifkn4oNkqLLF_WG5Dzf4rjd15EV7C=9a_H9CTM+w2Q@mail.gmail.com","threadId":"33451","inReplyTo":null,"subject":"git-archive --worktree-attributes (1.8.2)","fromName":"Amit Bakshi","fromEmail":"ambakshi@gmail.com","sentAt":"2013-04-09T20:43:32Z","receivedAt":"2013-04-09T20:43:32Z","isPatch":false,"sender":{"key":"ambakshi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/32329?v=4"},"body":"Hi,\n\n In the help for git-archive it states:\n\n       --worktree-attributes\n           Look for attributes in .gitattributes in working directory too.\n\nThis doesn't seem to be the case. I have a use case where I need to\narchive a remote I don't have write access too (via --remote=), and I\nwish to ignore certain paths. When I chdir to a temp dir, create a\n.gitattributes file, and call git archive --worktree-attributes, the\nbevaviour I see is that it is ignoring .gitattributes. I've tried\nsetting GIT_WORK_TREE to my temp dir, without success. Is the\ndocumentation wrong about 'working directory'? Did it mean to say\n'working tree'? Looking at the source for archive.c, it seems to\nassume a GIT_WORK_TREE.\n\n\nWould you accept a patch that either adds an option to explicitly set\nthe .gitattributes file or would let --worktree-attributes look in\n$PWD.\n\nThanks,\nAmit\n"},{"id":"213720","messageId":"7vk3obpfwc.fsf@alter.siamese.dyndns.org","threadId":"33451","inReplyTo":"CAFGOX=VXifkn4oNkqLLF_WG5Dzf4rjd15EV7C=9a_H9CTM+w2Q@mail.gmail.com","subject":"Re: git-archive --worktree-attributes (1.8.2)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-09T21:12:35Z","receivedAt":"2013-04-09T21:12:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Amit Bakshi <ambakshi@gmail.com> writes:\n\n> Hi,\n>\n>  In the help for git-archive it states:\n>\n>        --worktree-attributes\n>            Look for attributes in .gitattributes in working directory too.\n> ...\n\nThe worktree-attributes should read from the worktree.  It should\nnot pay any attention to where you are in the directory hierarchy,\ni.e. your current working directory (aka $cwd).\n\n> Would you accept a patch that either adds an option to explicitly set\n> the .gitattributes file or would let --worktree-attributes look in\n> $PWD.\n\nThe former, possibly, if accompanied with a good justification and\nimplemented cleanly.\n\nThe latter, definitely not.\n"},{"id":"213791","messageId":"5165A645.9090300@lsrfire.ath.cx","threadId":"33451","inReplyTo":"7vk3obpfwc.fsf@alter.siamese.dyndns.org","subject":"[PATCH] archive: clarify explanation of --worktree-attributes","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2013-04-10T17:49:57Z","receivedAt":"2013-04-10T17:49:57Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Make it a bit clearer that --worktree-attributes is about files in the\nworking tree (checked out files, possibly changed) and not the current\nworking directory ($PDW).  Link to the ATTRIBUTES section, which has\nmore details.\n\nReported-by: Amit Bakshi <ambakshi@gmail.com>\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\nDoes this help a bit?\n\n Documentation/git-archive.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt\nindex b4c2e24..3dd3069 100644\n--- a/Documentation/git-archive.txt\n+++ b/Documentation/git-archive.txt\n@@ -56,7 +56,8 @@ OPTIONS\n \tWrite the archive to <file> instead of stdout.\n \n --worktree-attributes::\n-\tLook for attributes in .gitattributes in working directory too.\n+\tLook for attributes in .gitattributes files in the working tree\n+\tas well (see <<ATTRIBUTES>>).\n \n <extra>::\n \tThis can be any options that the archiver backend understands.\n-- \n1.8.2.1\n"},{"id":"213799","messageId":"CAPig+cTM=ojKgq4HFenAaquRsR5nXL3mm4O4ZBO5CmwEYqk60g@mail.gmail.com","threadId":"33451","inReplyTo":"5165A645.9090300@lsrfire.ath.cx","subject":"Re: [PATCH] archive: clarify explanation of --worktree-attributes","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-04-10T18:40:30Z","receivedAt":"2013-04-10T18:40:30Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Apr 10, 2013 at 1:49 PM, René Scharfe\n<rene.scharfe@lsrfire.ath.cx> wrote:\n> Make it a bit clearer that --worktree-attributes is about files in the\n> working tree (checked out files, possibly changed) and not the current\n> working directory ($PDW).  Link to the ATTRIBUTES section, which has\n\ns/PDW/PWD/\n\n> more details.\n>\n> Reported-by: Amit Bakshi <ambakshi@gmail.com>\n> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n"},{"id":"213803","messageId":"7vd2u2mcyy.fsf@alter.siamese.dyndns.org","threadId":"33451","inReplyTo":"5165A645.9090300@lsrfire.ath.cx","subject":"Re: [PATCH] archive: clarify explanation of --worktree-attributes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-10T18:56:21Z","receivedAt":"2013-04-10T18:56:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:\n\n> Make it a bit clearer that --worktree-attributes is about files in the\n> working tree (checked out files, possibly changed) and not the current\n> working directory ($PDW).  Link to the ATTRIBUTES section, which has\n> more details.\n>\n> Reported-by: Amit Bakshi <ambakshi@gmail.com>\n> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n> ---\n> Does this help a bit?\n\nI personally thought that the original was already clear enough\n(especially when taken in the context of Git), but the new wording\nis not too verbose and should help avoiding misinterpretation.\n\nThanks.\n\n>\n>  Documentation/git-archive.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt\n> index b4c2e24..3dd3069 100644\n> --- a/Documentation/git-archive.txt\n> +++ b/Documentation/git-archive.txt\n> @@ -56,7 +56,8 @@ OPTIONS\n>  \tWrite the archive to <file> instead of stdout.\n>  \n>  --worktree-attributes::\n> -\tLook for attributes in .gitattributes in working directory too.\n> +\tLook for attributes in .gitattributes files in the working tree\n> +\tas well (see <<ATTRIBUTES>>).\n>  \n>  <extra>::\n>  \tThis can be any options that the archiver backend understands.\n"}]}