home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] more git pedantry -- clarifications about .gitignore

  • Subject: Re: [OCLUG-Tech] more git pedantry -- clarifications about .gitignore
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Wed, 29 Apr 2015 17:10:41 -0400 (EDT)
On Wed, 29 Apr 2015, Alex Pilon wrote:

> > > On Wed, Apr 29, 2015 at 08:33:51AM -0400, Robert P. J. Day wrote:
> >
> On Wed, Apr 29, 2015 at 12:18:05PM -0400, Robert P. J. Day wrote:
> >   which brings up even more pedantry (as you knew it would) ... from
> > "man 5 gitignore", we read:
> >
> > "If the pattern ends with a slash, it is removed for the purpose of
> > the following description, but it would only find a match with a
> > directory. In other words, foo/ will match a directory foo and paths
> > underneath it, ..."
> >
> >   in other words, "foo" would match all objects named "foo"
> > recursively and, in this trivial case, would be entirely equivalent
> > to:
> >
> >   **/foo
> >
> > however, it's not clear whether that equivalence would be true here:
> >
> >   **/foo/bar
> >   foo/bar
> >
> > are *those* equivalent? based on my reading, i don't think so -- if
> > you want to recursively match a multi-level pathname, you would appear
> > to need the leading "**/", is that correct?
>
> From a quick test I did, it seems you do need to add the double
> asterisk. Try to replicate the arch/include/generated and
> include/generated example.

  i verified that as well, so you can see why i'm asking such
"trivial" questions ... the gitignore man page is maddeningly vague in
a few spots and would, i think, benefit from a few examples.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================