Closed Neko-Box-Coder closed 2 months ago
Sounds like an easy fix: Just a matter of updating pkg/commands/git_commands/sync.go
FastForward
, similar to what we did here.
I'll chuck a 'good-first-issue' label on this. Do you feel up to the task @Neko-Box-Coder ?
@jesseduffield This is slightly different from before because git fetch doesn't have a branch specifier/option afaik
That's why I didn't suggest a change this time because the only way I can think of to get it work is to do a full reference so something like
git fetch "origin" "refs/heads/<branch name>":"<branch name>"
If that works, then do we want to change most if not all the branch/tag reference strings in other places to be using "refs/heads/
What do you think? I am fine picking up the task if it is only changing sync.go
but might not be suitable for changing all reference strings if you want to change all the reference strings.
I'm happy for us to change just this one place for now.
Yeah no problem, I will create a PR for it.
Describe the bug Git fast forward branch to remote fails when there's the same tag name because we didn't specify the fetch command to be a branch. This is pretty similar to #2546
It failed with
To Reproduce Steps to reproduce the behavior:
Expected behavior The branch with the same name as the tag should be fast-forwarded successfully
Screenshots If applicable, add screenshots to help explain your problem.
Version info:
lazygit --version: commit=v0.36.0, build date=2022-11-15T07:26:07Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.38.1
git --version: git version 2.38.1