-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing error message: when cloning a repository with main branch not being master #345
Comments
maybe we could make it work, or provide an appropriate error message? Also it would make sense to have a verbose output when it fails (or a hint that it exists), otherwise I need to re-run the command with verbose. |
@cgestes |
you are right Main is github specific. |
Here's what I think is happening. I assume your manifest looks like this: repos:
- dest: gotrue-dart
url: [email protected]/jotshq/gotrue-dart with no when we parse the manifest, we go through the following code class Manifest:
...
def _handle_repo(self, repo_config: Any) -> None:
dest = repo_config["dest"]
branch = repo_config.get("branch", "master") # 'master' hard-coded there
tag = repo_config.get("tag")
.... This explains why We could just modify the code to look like this: def _handle_repo(self, repo_config: Any) -> None:
- branch = repo_config.get("branch", "master")
+ branch = repo_config.get("branch")
class Repo:
dest: str
- branch: str
+ branch: Optional[str] But then The only clean fix I can think of is to require the branch to be specified in the manifest, but this is a breaking change. |
Writing a failing test for this was a bit harder than I expected, but you can see it at the corresponding branch |
Can we get a proper error message when the branch does'nt exist? Got this bug again, lost 10min again figuring out... even the verbose option doesn't show what is happening. There is really no easy way to understand what's happening. Btw I think git is going to change the name of the default branch soon also. |
Yup, we can. Turns out we introduced a generic |
With debug activated:
the main branch of the repository is main not master. (this is the default in github now)
(btw I had the same issue with the manifest)
The text was updated successfully, but these errors were encountered: