From: Toby Corkindale <toby.corkindale@rea-group.com>
To: git@vger.kernel.org
Subject: [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned)
Date: Fri, 28 Mar 2008 16:10:41 +1100 [thread overview]
Message-ID: <47EC7DD1.3060102@rea-group.com> (raw)
In-Reply-To: <20080327045342.GC6426@coredump.intra.peff.net>
Jeff King wrote:
> On Thu, Mar 27, 2008 at 03:48:31PM +1100, Toby Corkindale wrote:
>
>>> I vaguely recall some discussion of this in the past, so maybe it isn't
>>> a good idea. But I would think changing git-archive to respect
>>> .gitattributes might be worth doing (presumably the version of
>>> .gitattributes from the tree that is being exported).
>> Respecting the repo's .gitattributes would feel right. It seems unusual
>> (to me) that it bypasses $REMOTE/.gitattributes, but DOES check
>> $REMOTE/info/attributes.
>
> I agree that it seems like a bug. You might search the list archives for
> discussion around the export_subst attribute to see if it was discussed
> then or if it is simply an omission.
My searches haven't turned anything up that seems relevant.
I submit that this is a bug, or at least undesirable behaviour:
"git-archive --remote=/some/repo" will ignore /some/repo/.gitattributes,
but check /some/repo/info/attributes.
I think the problem is in the loop that looks for .gitattributes, which
seems to do so by taking the current path and iterating down through it?
In the case of remote archives, shouldn't that start by taking the path
of the repo, not current dir?
Or should it go one step further, and check the .gitattributes for every
file it extracts? That is the behaviour you get if you run git-archive
from within a repo, rather than remotely - and don't we want that to be
consistent with using --remote?
ie. I'm thinking of structures like:
/myModule/testfile.pm
/myModule/subdir/testfile.pm
/myModule/subdir/.gitattributes
if I do "cd /myModule; git-archive HEAD" then shouldn't I get the same
output as if I did "cd /tmp; git-archive --remote=/myModule HEAD" ?
next prev parent reply other threads:[~2008-03-28 5:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 3:08 .git/info/attributes not cloned Toby Corkindale
2008-03-27 3:33 ` Jeff King
2008-03-27 4:23 ` Toby Corkindale
2008-03-27 4:29 ` Jeff King
2008-03-27 4:48 ` Toby Corkindale
2008-03-27 4:53 ` Jeff King
2008-03-28 5:10 ` Toby Corkindale [this message]
2008-03-28 12:22 ` [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned) Johannes Schindelin
2008-03-28 13:02 ` Jakub Narebski
2008-03-28 13:22 ` Johannes Schindelin
2008-03-31 2:47 ` Jeff King
2008-03-31 3:07 ` [BUG?] git-archive ignores remote .gitattributes Junio C Hamano
2008-04-10 4:14 ` Toby Corkindale
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47EC7DD1.3060102@rea-group.com \
--to=toby.corkindale@rea-group.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).