-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
When you have a tag and branch with the same name (foobar
) in my case, you cannot press g
h
on the branches tab to reset to the foobar
branch.
To Reproduce
git init
git commit --allow-empty -m "Commit 1"
git tag foobar -m ""
git commit --allow-empty -m "Commit 2"
git branch -c foobar
git commit --allow-empty -m "Commit 3"
Launch LazyGit
Pres g
h
on branch foobar
Expected behavior
Expect to go to "Commit 2", and you actually go to "Commit 1"
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Built off of latest master a0ec22c251c6
git version 2.49.0
Additional context
I'll put a fix in for this shortly, just documenting here for posterity. I'm assuming we just need to make our reset command use a slightly more specific name that disambiguates the two.
From the debug logs, it seems we just run a git reset --hard foobar
. I imagine we'll just need to do a git reset --hard refs/heads/foobar
as the fix.