We currently will use a branch name over a tag name if they both exist.
Similarly, git checkout prefers switching to a branch:
❯ git tag v0.1.0
❯ gcm
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
❯ gcb v0.1.0
Switched to a new branch 'v0.1.0'
❯ gcm
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
❯ gco v0.1.0
warning: refname 'v0.1.0' is ambiguous.
Switched to branch 'v0.1.0'
but for installing packages I would much rather match a tag than a branch if there's a collision.
We currently will use a branch name over a tag name if they both exist.
Similarly,
git checkout
prefers switching to a branch:but for installing packages I would much rather match a tag than a branch if there's a collision.
_Originally posted by @zanieb in https://github.com/astral-sh/puffin/pull/297#discussion_r1380659592_