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

Re: [PATCH v2 1/3] builtin: add a repository parameter for builtin functions

From
Jeff King <peff@peff.net>
Date
Sep 12, 2024, 10:43 UTC
Message-ID
<20240912104319.GA593177@coredump.intra.peff.net>
In-Reply-To
<ZuK4RXMfherFBIxP@pks.im>
On Thu, Sep 12, 2024 at 11:45:47AM +0200, Patrick Steinhardt wrote:
Show 9 quoted lines
> > It turns out to be an "ar" archive full of *.o files.  Perhaps
> > creation of libgit.a was interrupted, then later somebody said
> > "git add .", and the file somehow ended up as a part of Git.
> > 
> > I've applied the series after removing the cruft.
> 
> I've noticed that something leaves behind this garbage from time to
> time. It's a shame that its name is just random gibberish, because that
> makes it impossible to set up a gitignore rule for it.

I've seen it once or twice, too. It's always st[A-Za-z0-9]{6}, at least on my system. Doing this:

diff --git a/Makefile b/Makefile
index 91f65d7dc5..b58312edab 100644
--- a/Makefile
+++ b/Makefile
@@ -2860,7 +2860,7 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
 		$(filter %.o,$^) $(LIBS)
 
 $(LIB_FILE): $(LIB_OBJS)
-	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
+	$(QUIET_AR)$(RM) $@ && ($(AR) $(ARFLAGS) $@ $^ & sleep 0.01; kill $$!) && false
 
 $(XDIFF_LIB): $(XDIFF_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^

and then running "make" several times got me:

  Untracked files:
  	st5AOnzl
  	st8gTTvD
  	stJABM4u
  	stKA7riS
  	stLZ4yDr
  	stMWJCVY
  	stjYXpN0
  	stwcX3kZ

I don't think we'd want to put anything in the tracked .gitignore, since
it involves system-specific details. But I think that:

  /st[0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z]

in your .git/info/excludes (or user-level gitignore) would work if you
want, and is probably not too likely to hit false positives (since it
lacks an extension).

I do feel like I have only started seeing it in the last month or so. I
wonder if a new version of binutils changed behavior or something.

-Peff
Previous: Patrick SteinhardtNext: Jeff King
Message 22 of 32 in “Add repository parameter to builtins”
  1. 0/3 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 5, 2024
  2. 2/3 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 5, 2024
  3. Junio C HamanoSep 5, 2024
  4. Patrick SteinhardtSep 6, 2024
  5. Junio C HamanoSep 6, 2024
  6. 1/3 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 5, 2024
  7. Patrick SteinhardtSep 6, 2024
  8. John CaiSep 9, 2024
  9. 3/3 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 5, 2024
  10. Patrick SteinhardtSep 6, 2024
  11. Junio C HamanoSep 5, 2024
  12. 0/3 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 10, 2024
  13. 3/3 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 10, 2024
  14. Junio C HamanoSep 11, 2024
  15. 2/3 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 10, 2024
  16. Junio C HamanoSep 11, 2024
  17. John CaiSep 13, 2024
  18. 1/3 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 10, 2024
  19. Junio C HamanoSep 10, 2024
  20. Junio C HamanoSep 11, 2024
  21. Patrick SteinhardtSep 12, 2024
  22. Jeff KingSep 12, 2024
  23. Jeff KingSep 12, 2024
  24. Patrick SteinhardtSep 12, 2024
  25. John CaiSep 13, 2024
  26. 0/4 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 13, 2024
  27. 1/4 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 13, 2024
  28. 3/4 builtin: remove USE_THE_REPOSITORY for those without the_repositoryJohn Cai via GitGitGadget, Sep 13, 2024
  29. 2/4 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 13, 2024
  30. Junio C HamanoSep 13, 2024
  31. 4/4 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 13, 2024
  32. Junio C HamanoSep 13, 2024

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.