pip install -e inconsistent checkout with git url and branch
See original GitHub issueHi,
The way pip install -e works is inconsistent when you specify the branch name in a git url.
Look at the following behaviours :
Specifying a branch, example master on pip source repository:
$ pip install -e git+https://github.com/pypa/pip.git@master#egg=pip
$ cd src/pip/
$ git status
HEAD detached at 08ebc0a
nothing to commit, working directory clean
Specifying a branch again, develop from the same repo this time :
$ pip install -e git+https://github.com/pypa/pip.git@develop#egg=pip
$ cd src/pip/
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
I would not expect to have 2 different states for the same command, depending on the branch I specified is the default one or not. Because I specified it in both cases, this should behave in the same way. Any further work with this editable installation becomes dependant on whether I am in the first case, or the second one.
Issue Analytics
- State:
- Created 9 years ago
- Comments:18 (14 by maintainers)
Top Results From Across the Web
Why #egg=foo when pip-installing from git repo
When installing via git or other VCS urls, you will want to find the tag or hash of the version you need. For...
Read more >Installing (1.x)
pip install -e 'git+https://github.com/fabric/fabric@v1#egg=fabric'. Or cloning the Git repository and running: $ git checkout v1 $ pip install -e .
Read more >Troubleshoot pipeline runs - Azure DevOps
My pipeline is failing on a checkout step. If you are using a checkout step on an Azure Repos Git repository in your...
Read more >User Guide - pip documentation v22.3.1
When installing packages from PyPI, pip requires internet access, which in many corporate environments requires an outbound HTTP proxy server. pip can be ......
Read more >Installing Ansible
Installing devel from GitHub with pip. Installing devel from GitHub by cloning. Running the devel branch from a clone. Confirming your installation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, if people don’t mind I’m going to assign myself to this issue as it’s something I’ve had my eye on for a while and had put a fair amount of thought into. Also, the refactoring I had been wanting to do before working on this issue (and that I mentioned above) is now pretty much done. (Thank you, @pradyunsg and @xavfernandez for the reviews!)
The main prerequisite to this issue is PR #5623, which I’m still waiting for a review on. The new
resolve_revision()
method that PR adds will be very useful in addressing this issue.For this issue, I was planning to address just the
fetch_new()
(aka “clone”) case as it’s simpler than theupdate()
case and can be addressed separately. Theupdate()
case can be addressed in a later PR.Thanks @deveshks!