-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
git install doesn't recognize new main
default branch
#3366
Comments
I could create a PR if you like. |
Based on what clue should it be decided to go for
Where? In git, in github, in your own projects? Can the default branch name be auto-detected somehow? |
@sinoroc github has changed for all newly created repo. https://www.zdnet.com/article/github-to-replace-master-with-main-starting-next-month/ My impulse answer would be to check (or to try-catch) starting for 'master' then 'main'. or, we can derive the implementation from pip. |
One thing to note also that, the verbose message of the error is not really helpful if not looking carefully. The verbose message should tell the user about the cause that the target branch is not exist. |
Poetry should simply not specify a branch by default. This should then default to whatever is the server default and this should adhere to expected behaviour. Might require removing this "master is default" assumption at multiple points in the code. PR welcome. As for the error messages. There is very little we can do here at the moment since the |
The only meaningful direct reference in code I could find is there: if not any([branch, tag, rev]):
# If nothing has been specified, we assume master
branch = "master" The rest of the code should probably be adapted to work when |
Is this still open? I could try to tackle this as my first issue. |
Yes, as far as I can tell, there is no PR yet so you'd be first. |
This is definitely a dumb question, but I need to work on poetry-core, right? Not in the poetry repo. |
As far as I can tell, yes. At least, I would start with poetry-core. Then it will show if some more modifications are needed in poetry or not. |
Is it still open ? I would like to take it as my first issue. |
You might want to take a look here first. python-poetry/poetry-core#117 |
Reopening as the PR was reverted. |
What is the status of this? It was opened and closed, merged and reverted, so many times that I got lost 😟 |
I still faced this issue on the latest Poetry (1.1.6) |
I still faced this issue on the latest Poetry (1.1.7)... |
I have submitted a PR to solve this, #4386. |
Here's the set of steps to reproduce the same issue occuring when I edit the Steps:
resutls in:
Workaround:Use |
@joooeey |
My poetry packages are not installable from git unless i specify the #main branch. |
It is fixed by python-poetry/poetry-core#192 which is available in poetry-core 1.1.0a7. So this will be fixed by (re)intalling the latest poetry pre-release version (1.2.0a2). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
poetry add git+https://github.com/AGeekInside/fastapi-jinja.git
result in exception since it is tires to checkoutmaster
branch.as the default branch name has changed, poetry should both accept
main
andmaster
.the workaround is
poetry add git+https://github.com/AGeekInside/fastapi-jinja.git#main
pip install git+https://github.com/AGeekInside/fastapi-jinja.git
The text was updated successfully, but these errors were encountered: