All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Ulrich Niedermann <hun@n-dimensional.de>
To: grub-devel@gnu.org
Subject: Re: [PATCH] gitignore: Add a few forgotten files
Date: Wed, 22 Apr 2020 22:31:35 +0200	[thread overview]
Message-ID: <20200422223135.158a21da@n-dimensional.de> (raw)
In-Reply-To: <2acfbf19-fab9-65ce-2c64-65bc9376812f@physik.fu-berlin.de>

On Wed, 22 Apr 2020 21:54:14 +0200
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> On 4/22/20 9:44 PM, Hans Ulrich Niedermann wrote:
> > Signed-off-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
> > ---
> >  .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	other threads:[~2020-04-22 20:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 19:44 [PATCH] gitignore: Add a few forgotten files Hans Ulrich Niedermann
2020-04-22 19:54 ` John Paul Adrian Glaubitz
2020-04-22 20:31   ` Hans Ulrich Niedermann [this message]
2020-04-22 20:43     ` John Paul Adrian Glaubitz
2020-04-23 10:08     ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422223135.158a21da@n-dimensional.de \
    --to=hun@n-dimensional.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.