pypa/pip

`pip install git+...` from a branch/tag could be faster

Open

#13.060 geöffnet am 30. Okt. 2024

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (3.032 Forks)batch import
C: vcshelp wantedtype: enhancementtype: performance

Repository-Metriken

Stars
 (8.952 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 13T 7h) (20 gemergte PRs in 30 T)

Beschreibung

What's the problem this feature will solve?

pip install git+...@foo-branch clones the whole repository and then checks out foo-branch. This process takes some time if the repository has a long history or many branches.

Describe the solution you'd like

I'd like to leverage git clone parameters to make the whole thing faster when a specific branch is requested. In particular, I'd use `the following:

  • --branch foo-branch
  • --depth 1

Alternative Solutions

The current solution works fine, but is slow in some specific situations.

Additional context

https://git-scm.com/docs/git-clone

Code of Conduct

Contributor Guide