Closed scholzb-hb closed 2 years ago
The same problem may occur when creating the namespaced tags. The tags within .git/packed-refs
are ignored in this case.
The easiest way to work around this is to disable gc-auto right after creating the new repository, like so:
git init --bare .git
# we don't want pack-refs to run and break our flow
git config gc.auto 0
Then at the end of the main function, re-enable gc.auto. I also recommend running a full GC to optimize the resulting monorepo.
# optimize the git storage files
git config --unset gc.auto
git gc --aggressive
This was fixed for branches but is still an issue for tags.
The function
remote-branches
has a bug which may lead to missing branches and/or subtrees in the monorepo.The file-based approach for listing all branches for a given remote does not consider packed-refs. The Git GC (garbage collector) may occasionally pack individual ref files into a single file named
.git/packed-refs
and remove them from therefs
directory. Those refs will be ignored by tomono.Further information:
For now we cannot provide any steps to reproduce, but it seems that the issue is related to the number and size of the repositories to process. In our case, we migrated ~100 single repositories with a total of ~125000 commits and ~1400 remote branches into a monorepo, when we detected that the content of a certain single repository was missing.