Skip to content

Error cloning empty repos #7

@w3s7y

Description

@w3s7y

If during discovery of repos we find some that are completely empty, when git.py comes to clone them we see:

AssertionError: Remote 'origin' has no refspec set.

Line 93 in switch_branch_then_pull of git.py

Which is thrown all the way up the stack (uncaught exception) and causes mass-driver run to exit non-zero.

Possible solutions

  • During discovery phase (potentially in a plugged-in source) we omit empty repos from the run entirely
    • Would need to perform an additional API request per repo to determine if repo has 0 commits. Could get expensive...
  • The pull code in git.py is wrapped to catch the error and log it, then remove the repo from processing

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