Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter-repo: handle origin refs without origin remote
git-svn creates references of the form refs/remotes/origin/..., even though it does not actually set up an origin remote. Prior to a12d742 (filter-repo: notify users when we remove the origin remote, 2024-07-30) this would have resulted in a fatal: No such remote: 'origin' error from the attempt to run `git remote rm origin`. However, the exit status of the command was ignored so filter-repo would have continued on and ended up getting the right result, just scaring users. Still suboptimal, but at least it worked. Since the above-mentioned commit, though, the code would die with a traceback stating that b'remote.origin.url' was not found in self._config_settings. Just return early from _migrate_origin_to_heads() when there is no remote configured to avoid these problems. Signed-off-by: Elijah Newren <[email protected]>
- Loading branch information