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
If during discovery of repos we find some that are completely empty, when
git.pycomes to clone them we see:AssertionError: Remote 'origin' has no refspec set.Line 93 in
switch_branch_then_pullofgit.pyWhich is thrown all the way up the stack (uncaught exception) and causes
mass-driver runto exit non-zero.Possible solutions
discoveryphase (potentially in a plugged-in source) we omit empty repos from the run entirelygit.pyis wrapped to catch the error and log it, then remove the repo from processing