Re: [PATCH 2/4] .gitignore: remove dangling file

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

 



On Tue, Dec 01, 2020 at 10:30:12AM -0800, Junio C Hamano wrote:

> Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:
> 
> > The library was removed 7 years ago on commit ae34ac126f. But not from
> > the .gitignore file.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> > ---
> 
> Good eyes.  Any automation used here, or just mark I eyeballs?

I was curious how hard it would be to find unused ones, and it is not
too bad:

  find * -type f |
  git check-ignore --stdin -v |
  perl -e '
    my $ignore_file = shift;
    while (<>) {
      /^\Q$ignore_file\E:(\d+)/ and $seen{$1} = 1;
    }
    open(my $fh, "<", $ignore_file);
    while (<$fh>) {
      print "$. $_" unless $seen{$.};
    }
  ' .gitignore

It turns up many hits, depending on what built cruft you have in your
directory (having a crufty state is nice because it shows which patterns
are used, but it also may mean you have leftover trash from old versions
that doesn't get built anymore, and which we wouldn't notice). So I
think a human has to apply some brain-power to the result to see which
ones are plausibly created by other people's environments.

You might want to revisit some of the old dist rules (do we still ever
build git-core-*? "make dist" doesn't seem to. Likewise, "make rpm" and
"make deb" are no more, so perhaps it's time to drop those ignores.

The one below didn't take much brain-power, though.

-- >8 --
Subject: [PATCH] gitignore: drop duplicate entry for git-sh-i18n

This was accidentally added by e00cf070a4 (git-sh-i18n.sh: add no-op
gettext() and eval_gettext() wrappers, 2011-05-14), even though an
earlier commit in the same series had already done so.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 .gitignore | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f85d02c854..d20d4afc1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -152,7 +152,6 @@
 /git-sh-i18n
 /git-sh-i18n--envsubst
 /git-sh-setup
-/git-sh-i18n
 /git-shell
 /git-shortlog
 /git-show
-- 
2.29.2.894.g2dadb8c6b8




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux