Skip to content

packed-refs are ignored when listing remote branches #32

@scholzb-hb

Description

@scholzb-hb

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 the refs 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions