[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 01/11 v2] gitignore: Move ignores from global to subdirectories
On Fri, Sep 11, 2020 at 08:29:51AM +0200, Jan Beulich wrote: > On 10.09.2020 20:22, Elliott Mitchell wrote: > > I had *thought* "./" would restrict to capturing files in the current > > directory, but after some testing and then some reading of the > > documentation (oh, `git check-ignore` is a thing). Then reading the > > documentation again. Then reading the documentation *again*. I found an > > initial "/" restricts a pattern to the current directory, but `git` > > doesn't handle "./". > > > > Apparently a pattern with a slash *anywhere* besides the *end* (which > > includes the very start) will be treated as a full path relative to the > > current directory. As such "foo/bar" and "/foo/bar" are equivalent. Yet > > "foo" and "/foo" are *not* equivalent. > > But then ./foo and /foo ought to be equivalent, too. Unless of > course the . gets in the way of matching names in the first > place ... Could be something along those lines. Note gitignore is a function of *git* *simulating* the actions involved in accessing files, not something pretending to be all that close to an actual kernel implementation. The result is testing with `git check-ignore` indicated "./" did not work, so I had to use "/" which looks odd in a suspicions way. I rather liked "./", but with reality intruding. -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sigmsg@xxxxxxx PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |