Message ID | 20201201004649.57548-3-felipe.contreras@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 02b5aa5825feed6d26e82d827050c8f97c212212 |
Headers | show |
Series | Random cleanups | expand |
Felipe Contreras <felipe.contreras@gmail.com> writes: > The library was removed 7 years ago on commit ae34ac126f. But not from > the .gitignore file. > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > --- Good eyes. Any automation used here, or just mark I eyeballs? > .gitignore | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/.gitignore b/.gitignore > index f85d02c854..7c5096aee5 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -135,7 +135,6 @@ > /git-remote-ftps > /git-remote-fd > /git-remote-ext > -/git-remote-testpy > /git-repack > /git-replace > /git-request-pull
On Tue, Dec 1, 2020 at 12:30 PM Junio C Hamano <gitster@pobox.com> wrote: > > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > The library was removed 7 years ago on commit ae34ac126f. But not from > > the .gitignore file. > > > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > > --- > > Good eyes. Any automation used here, or just mark I eyeballs? Nope. Just switching to a very old branch prompted me to look at the .gitignore file and I stumbled upon it.
On Tue, Dec 01, 2020 at 10:30:12AM -0800, Junio C Hamano wrote: > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > The library was removed 7 years ago on commit ae34ac126f. But not from > > the .gitignore file. > > > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > > --- > > 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@peff.net> --- .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
On Tue, Dec 1, 2020 at 8:26 PM Jeff King <peff@peff.net> wrote: > 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 Or to use a more modern language: find * -type f | git check-ignore --stdin -v | ruby -e ' $ignore_file = ARGV.first $seen = {} $stdin.each do |e| e =~ /^#{Regexp.quote($ignore_file)}:(\d+)/ and $seen[$1.to_i - 1] = true end ARGF.each_with_index do |e, i| print "#{i} #{e}" unless $seen[i] end ' .gitignore
diff --git a/.gitignore b/.gitignore index f85d02c854..7c5096aee5 100644 --- a/.gitignore +++ b/.gitignore @@ -135,7 +135,6 @@ /git-remote-ftps /git-remote-fd /git-remote-ext -/git-remote-testpy /git-repack /git-replace /git-request-pull
The library was removed 7 years ago on commit ae34ac126f. But not from the .gitignore file. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- .gitignore | 1 - 1 file changed, 1 deletion(-)