git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wrong gitattributes documentation?
@ 2017-06-02 17:12 Rene Pasing
  2017-06-03  0:01 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Rene Pasing @ 2017-06-02 17:12 UTC (permalink / raw)
  To: git

Hi all,

I have noticed a strange behaviour when using git-lfs.

If I understood correctly, git-lfs adds patterns to .gitattributes, for 
which git then calls lfs for any matches with this pattern.

The problem is, the documentation[1] says: "The rules how the pattern 
matches paths are the same as in .gitignore files; see gitignore[5].", 
so when I have a pattern like '/images/', it should match on all 
files+folders under /images, even the directory itself, right? Or when 
I'd use '/images/*', it should match on all files+folders under /images, 
right?

This does not seem to be the case. Nothing is done by lfs when using 
'/images/', and when using '/images/*', it only takes into account files 
which are directly in /images (so it doesnt take into account 
subdirectories).

The only solution to this (until now) is to use '/images/**/*', which 
seems to do exactly what I want (lfs gets executed for all files+folders 
under /images).

Is this expected behaviour? If yes, then the documentation of 
gitattributes seems incorrect to me. If not, can this be considered as a 
bug?

I found several complaints about this to git-lfs (or other projects 
relying on gitattributes), e.g. [2], but I didn't find anything about 
this regarding gitattributes itself.

Thanks for answers
Regards
Rene

PS: $ git --version
git version 2.1.4

[1] = https://git-scm.com/docs/gitattributes
[2] = https://github.com/git-lfs/git-lfs/issues/2068

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-03  1:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-02 17:12 Wrong gitattributes documentation? Rene Pasing
2017-06-03  0:01 ` Junio C Hamano
2017-06-03  1:10   ` Rene Pasing
2017-06-03  1:20   ` Rene Pasing

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).