[RFC] gitattributes on a bare repo

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[RFC] gitattributes on a bare repo

Giuseppe Bilotta-3
Hello all,

I realized recently that gitattributes don't work on a bare repo. It's
easy to see why (no .gitattributes file to look into) and the
'official' solution is to use .git/info/attributes for that, which has
the obvious problem of being local and not carried over to other repos
(so that e.g. you have to recreate it and keep it up to date on remote
repos too).

I was discussing this on IRC with pasky and he suggested that the best
way to approach the matter was to use the .gitattributes from the
relevant head. For example, a diff-tree would use the first
.gitattributes from the first tree-ish parameter. I have actually
looked into implementing this myself, but I'm afraid my git mojo isn't
strong enough yet.

A similar discussion would hold of course for .gitignore and the
corresponding info/excludes file.

I'm not sure how widespread the need for such a possibility (using
.gitignore and .gitattributes on bare repos) is, but at least
.gitattributes it would allow gitweb to use the correct diff

Giuseppe "Oblomov" Bilotta
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html