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: Daniel Kiper
Subject: Re: [PATCH] gitignore: Add a few forgotten files
Date: Thu, 23 Apr 2020 12:08:37 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Apr 22, 2020 at 10:31:35PM +0200, Hans Ulrich Niedermann wrote:
> 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.

I have checked the .gitignore file and it looks like complete mess. So,
if you touch this file I would like to ask you to do some cleanups.
First of all group all entries with "/" and without it in separate
groups (one empty line separator is OK; I think that entries with "/"
should land in first group but I am not strongly tied to that). This
should go into patch one. Then sort both groups alphabetically (second
patch). And at the end add your entries into relevant groups (third
patch or four one if you do next). If you could identify which currently
existing entries have "/" missing and add it that would be perfect
(third patch).

And some more hints. If you post more than one patch please create cover
letter (git send-email --compose ...). Please create new thread for new
patchset and do not attach it to the existing threads. If you need to
repost the patches please repost whole series as new thread instead of
individual patches. Though I will review patches posted up until now.

Daniel



reply via email to

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