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

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

 



On Thu, Sep 12, 2024 at 11:45:47AM +0200, Patrick Steinhardt wrote:

> > 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




[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