grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gitignore: Add a few forgotten files


From: Hans Ulrich Niedermann
Subject: Re: [PATCH] gitignore: Add a few forgotten files
Date: Wed, 22 Apr 2020 22:31:35 +0200

On Wed, 22 Apr 2020 21:54:14 +0200
John Paul Adrian Glaubitz <address@hidden> wrote:

> On 4/22/20 9:44 PM, Hans Ulrich Niedermann wrote:
> > Signed-off-by: Hans Ulrich Niedermann <address@hidden>
> > ---
> >  .gitignore | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 819cd185d..149b3713a 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -3,6 +3,7 @@
> >  10_*
> >  20_linux_xen
> >  30_os-prober
> > +/30_uefi-firmware
> >  40_custom
> >  41_custom
> >  *.1
> > @@ -18,6 +19,7 @@ build-grub-gen-asciih
> >  build-grub-gen-widthspec
> >  build-grub-mkfont
> >  cdboot_test
> > +/ChangeLog
> >  cmp_test
> >  config.cache
> >  config.guess
> > @@ -31,6 +33,7 @@ configure
> >  core_compress_test
> >  DISTLIST
> >  docs/*.info
> > +/docs/*.info-*
> >  docs/stamp-vti
> >  docs/version.texi
> >  ehci_test  
> 
> What's with the preceding slash in the filenames? Is it really
> "/30_uefi-firmware"?

Yes.

If a ".gitignore" file contains

    /ChangeLog

then git will only ignore a file named "ChangeLog" located in the same
directory where the .gitignore file is, i.e. a file like
"subdir/ChangeLog" will not match.

If a ".gitignore" file contains

    Makefile

then git will ignore all files named Makefile located in the same
directory where the .gitignore file is _and_in_all_of_its_subdirs_.

The files I want to ignore are created in just one specific
(sub)directory, so I want to ignore those files only in their
respective (sub)directory. Ignoring other files located in some other
directory just because they happen to have the same name does not make
sense and would be a mistake.

Of course, this means it would make most sense to actually change most
lines in .gitignore to start with "/", but I just wanted to _add_ a few
forgotten files here without rewriting everything from scratch, but
without copying the mistakes of the existing lines to the newly added
lines.

Uli



reply via email to

[Prev in Thread] Current Thread [Next in Thread]