Re: .git/info/attributes not cloned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:
On Thu, Mar 27, 2008 at 02:08:30PM +1100, Toby Corkindale wrote:

If one creates a .git/info/attributes file in a Git repo, it will not be present in cloned repos. I don't know if this is a bug or not, but it /seems/ wrong behaviour to me, and reading from the manual pages.

It is not a bug. The .gitattributes file in your working directory _is_
cloned, and that is the right place to put things that you want to be
revision-controlled and used in every repo. The .git/info/attributes
file is for attributes that are purely local to that repo. This is
similar to the split between .git/info/exclude and .gitignore.

Ah, OK.
I was hoping not to use .gitattributes, as then the attributes are ignored when doing something like:
git archive --remote=example.com:/path/to/repo release/v2.1 | tar xf -

Can you point out which part of the manual gave the wrong impression (or
better yet, submit a patch making it more clear)?

Now that you've mentioned the difference between info/exclude and .gitignore, I see that in the docs/user-manual.html it is said:

"If you wish the exclude patterns to affect only certain repositories (instead of every repository for a given project), you may instead put them in a file in your repository named .git/info/exclude, or in any file specified by the core.excludesfile configuration variable."

That gives a clue that the /info/ files are repo-specific.
However in gitignore(5) and gitattributes(5), there is no explanation of this - it simply mentions that the info version is a higher priority than the .git{ignore,attributes} version.

I suggest that the individual docs/man-pages should mention that too.
I'll submit a patch in a separate email, as long as I'm not still misunderstanding the mechanism.

Is there a recommended way to make attributes apply to commands run on a remote repository, or is that a different bug?

thanks,
Toby
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux