{"thread":{"id":"22330","subject":"git-archive ignores export-ignore","startedAt":"2010-01-21T22:13:12Z","lastAt":"2010-01-22T18:07:57Z","messageCount":3,"participants":["Todd A. Jacobs","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132348","messageId":"20100121221312.GB5307@penguin.codegnome.org","threadId":"22330","inReplyTo":null,"subject":"git-archive ignores export-ignore","fromName":"Todd A. Jacobs","fromEmail":"nospam@codegnome.org","sentAt":"2010-01-21T22:13:12Z","receivedAt":"2010-01-21T22:13:12Z","isPatch":false,"sender":{"key":"nospam@codegnome.org","avatar":null},"body":"Using git 1.6.4.2, the manual page prophesies that:\n\n    Files and directories with the attribute export-ignore won't be\n    added to archive files. See gitattributes(5) for details.\n\nHowever, various tools seem to be unhappy about this attribute. In\nparticular, checkout complains about invalid attributes:\n\n    $ cat .gitattributes\n    *.py export-subst\n    *.html export-subst\n    juniperxml.cfg export-ignore\n\n    $ git checkout juniperxml.cfg\n    export-ignore is not a valid attribute name: .gitattributes:3\n\nIt appears that git-archive doesn't seem to respect the attribute\neither. Consider the following example:\n\n    cd /tmp\n    mkdir foo\n    cd foo\n    git init\n    touch foo.sh\n    echo '*sh' > .gitattributes\n    git add foo.sh\n    git add .gitattributes\n    git commit -m test\n    git archive HEAD\n    pax_global_header00006660000000000000000000000064113261226070014512gustar00rootroot0000000000000052 comment=202d78e6a44c7f10bee2ad96a3b2adc80fc33468\n    .gitattributes000066400000000000000000000000041132612260700137430ustar00rootroot00000000000000*sh\n    foo.sh000066400000000000000000000000001132612260700121630ustar00rootroot00000000000000\n\nIn addition to whatever bugs there might be in reading and applying the\nattributes correctly, it would seem that the man page could be a bit\nclearer on how and where to apply the attributes.\n\nAssuming PEBKAC for the moment, how can I get the behavior I'm\nexpecting?\n\n-- \n\"Oh, look: rocks!\"\n\t-- Doctor Who, \"Destiny of the Daleks\"\n"},{"id":"132352","messageId":"7vocknhs70.fsf@alter.siamese.dyndns.org","threadId":"22330","inReplyTo":"20100121221312.GB5307@penguin.codegnome.org","subject":"Re: git-archive ignores export-ignore","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-22T00:57:39Z","receivedAt":"2010-01-22T00:57:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Todd A. Jacobs\" <nospam@codegnome.org> writes:\n\n> Using git 1.6.4.2, the manual page prophesies that:\n>\n>     Files and directories with the attribute export-ignore won't be\n>     added to archive files. See gitattributes(5) for details.\n>\n> However, various tools seem to be unhappy about this attribute. In\n> particular, checkout complains about invalid attributes:\n>\n>     $ cat .gitattributes\n>     *.py export-subst\n>     *.html export-subst\n>     juniperxml.cfg export-ignore\n>\n>     $ git checkout juniperxml.cfg\n>     export-ignore is not a valid attribute name: .gitattributes:3\n\n    $ cat .gitattributes\n    * whitespace=!indent,trail,space\n    *.[ch] whitespace=indent,trail,space\n    *.sh whitespace=indent,trail,space\n    COPYING export-ignore\n    $ git checkout COPYING\n    $ wc -l COPYING\n    360 COPYING\n\nThere is something that is different in my failed attempt to reproduce it\nfrom your problem description, but I cannot tell what it is.\n\nDo you have some garbage character immediately after \"e\" in \"-ignore\"?\n"},{"id":"132411","messageId":"20100122180757.GD5307@penguin.codegnome.org","threadId":"22330","inReplyTo":"7vocknhs70.fsf@alter.siamese.dyndns.org","subject":"Re: git-archive ignores export-ignore","fromName":"Todd A. Jacobs","fromEmail":"nospam@codegnome.org","sentAt":"2010-01-22T18:07:57Z","receivedAt":"2010-01-22T18:07:57Z","isPatch":false,"sender":{"key":"nospam@codegnome.org","avatar":null},"body":"On Thu, Jan 21, 2010 at 04:57:39PM -0800, Junio C Hamano wrote:\n\n> There is something that is different in my failed attempt to reproduce it\n> from your problem description, but I cannot tell what it is.\n> \n> Do you have some garbage character immediately after \"e\" in \"-ignore\"?\n\nNo, but it turns out that juniperxml.cfg is actually a symlink in this\nrepository. I'm not sure that should make a difference, but perhaps\nthat's the missing element in recreating the problem.\n\nI wouldn't think so, because the reason it's a symlink is because I was\nunable to get git-archive to ignore the actual file on export, so I\nmoved it elsewhere and replaced it with a symlink so that the contents\nof the file weren't exported.\n\nHope that helps!\n\n-- \n\"Oh, look: rocks!\"\n\t-- Doctor Who, \"Destiny of the Daleks\"\n"}]}