twosigma / git-meta

Repository for the git-meta project -- build your own monorepo using Git submodules
http://twosigma.github.io/git-meta
BSD 3-Clause "New" or "Revised" License
216 stars 50 forks source link

Do not GC repos under test (fixes #864) #865

Closed geofft closed 2 years ago

geofft commented 2 years ago

This is probably not a very fulfilling fix, but it addresses the issue that for at least one of the test cases involving a rebase, the commit that is recorded as the starting point of the rebase exists in the submodule's remote but not in the non-bare submodule.

Since WriteRepoASTUtil is only used from either test code or test-oriented utilities (generate-repos and write-repo), it seems safe to skip the GC.

Arguably, this points to a real bug somewhere if this commit is unrooted and therefore prone to being GC'd, but I think that bug is lives entirely within the repo AST stuff (in generating a repo that's in the middle of a rebase), so this probably does not paper over a problem that could impact real git-meta users.

geofft commented 2 years ago

This isn't the right approach because it causes a bunch of other test failures about commits that we expected to get GC'd.