git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Dec 2, 2020, 02:26 UTC
Message-ID
<X8b7UMcsfaD0OFv4@coredump.intra.peff.net>
In-Reply-To
<xmqqczztqszv.fsf@gitster.c.googlers.com>
On Tue, Dec 01, 2020 at 10:30:12AM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> 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
-- 
2.29.2.894.g2dadb8c6b8
Previous: Felipe ContrerasNext: Felipe Contreras
Message 13 of 18 in “Random cleanups”
  1. 0/4 Random cleanupsFelipe Contreras, Dec 1, 2020
  2. 4/4 tests: lib-functions: trivial style cleanupsFelipe Contreras, Dec 1, 2020
  3. 1/4 refspec: trivial cleanupFelipe Contreras, Dec 1, 2020
  4. Jeff KingDec 1, 2020
  5. Junio C HamanoDec 1, 2020
  6. Felipe ContrerasDec 1, 2020
  7. Jeff KingDec 2, 2020
  8. Felipe ContrerasDec 2, 2020
  9. 3/4 test: completion: fix typosFelipe Contreras, Dec 1, 2020
  10. 2/4 .gitignore: remove dangling fileFelipe Contreras, Dec 1, 2020
  11. Junio C HamanoDec 1, 2020
  12. Felipe ContrerasDec 1, 2020
  13. Jeff KingDec 2, 2020
  14. Felipe ContrerasDec 2, 2020
  15. gitignore: remove entry for git serveRené Scharfe, Dec 2, 2020
  16. Johannes SchindelinDec 2, 2020
  17. Jeff KingDec 2, 2020
  18. Junio C HamanoDec 2, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.