Description
Describe the bug/To reproduce
A
B <= start rebase
modify foo.py content in my code editor
in lazygit I select foo;py and amend it (A)
rebase continue
commit A conflicts with B
So I must modify foo.py now and solve the problem
A popup appears should we continue the merge. I hit esape because obviously I gotta check the diff of my commit, possibly edit the commit messag etc.
Commit seems ok. I append (click A).
And here's the problem. Instead of editing last, conflicting, commit it SQUASH without telling me with the last commit.
So now instead of
A
B
I just have
B (B only has the commit message of B. But it has the code of A and B)
So basically the bug is: if you ever happen to A while in a rebase conflict then the commit A wil merge with commit B.
So hopefully no one will say "hum technically it's not a bug". IDK the technicalities but I'll add personnal context: I work for weeks on commit. I have to constantly rebase them (company policy + we use gerrit which is rebase only unlike GH). I have long series (+20 patches) and can spend a day rebasing just one. Having one commit randomly merged inside my series is not always obvious to notice. I cannot unmerge the commit. I gotta manually split them or redo the whole rebase. It is really distraughting to see my very long rebase turned into random merge sessions.
I love your app but I cannot stress enough of critical I feel like this bug/bad UX is.
Expected behavior
Make amend works the same for conflicting commit as for non conflicting commit.
Screenshots
Version info:
commit=c03b89227092b852d50015d289a7c6d8c69811c5, build date=2025-01-17T13:37:10Z, build source=binaryRelease, version=0.45.2, os=linux, arch=amd64, git version=2.34.1
⟩ git --version
git version 2.34.1
Additional context
git config --list
user.name=
user.email=[email protected]
include.path=/home/ilan/dev/tools/dotfiles/gitinclude
core.excludesfile=/.gitignore
core.autocrlf=input
alias.br=branch
alias.co=checkout
alias.ci=commit
alias.ri=rebase -i
alias.st=status
alias.stat=status
alias.pop=reset HEAD
alias.undo=reset HEAD~
alias.glog=log --graph
alias.tempo=commit -a -m tempo
alias.su=submodule update --init --recursive
alias.rh=reset --hard
alias.cp=cherry-pick
alias.amend=commit --amend
alias.squash=commit --amend -C HEAD
alias.fixup=commit --amend -C HEAD
alias.unstash=stash apply
alias.track=add -N
alias.untrack=rm --cached
alias.vimdiff=difftool -y -t vimdiff
alias.workdir=!sh /usr/share/doc/git/contrib/workdir/git-new-workdir
alias.branch-contains=branch origin/* --remotes --contains
alias.find-merge=!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'
alias.diff-no-blank=diff --ignore-space-change --ignore-all-space --ignore-blank-lines
alias.diff-word=diff --word-diff --word-diff-regex="[^ ;]+"
alias.show-word=show --word-diff --word-diff-regex="[^ ;]+"
alias.diff-char=diff --word-diff --word-diff-regex=.
alias.show-char=show --word-diff --word-diff-regex=.
alias.picore=cherry-pick
alias.decoupe=bisect
alias.journal=log
alias.graffiti=tag
alias.ajoute=add
alias.dichotomie=bisect
alias.transaction=commit
alias.deploiement=checkout
alias.cerise=cherry
alias.recherche-par-expression-rationelle=grep
alias.fusionne=merge
alias.planque=stash
alias.ramasse-miettes=gc
alias.tire=pull
alias.pousse=push
alias.pousse-fort=push-for
alias.montre=show
alias.rembobine=reset
alias.supprime-cette-merde=revert
alias.balance=blame
alias.poop=stash pop
alias.truite=merge
color.ui=auto
color.diff=auto
color.branch=auto
color.status=auto
color.pager=true
color.interactive=auto
color.diff.meta=green
color.diff.frag=yellow
color.diff.old=magenta
color.diff.new=bold cyan
color.status.header=bold blue
color.status.added=green
color.status.changed=bold red
color.status.untracked=bold yellow
notes.displayref=refs/notes/*
commit.template=/srv/tools/share/dotfiles/git-commit-template
push.default=upstream
merge.verbosity=1
merge.conflictstyle=diff3
merge.stat=true
merge.renamelimit=100000
merge.ff=false
merge.ours.driver=true
rebase.stat=true
rebase.autosquash=true
diff.renames=copies
url.ssh://git.corp:29418/.insteadof=git.corp:/srv/git
url.ssh://git.corp:29418/.insteadof=ssh://git.corp/srv/git
url.ssh://git.corp:29418/.insteadof=[email protected]:
url.ssh://git.corp:29418/mmsx.insteadof=git.corp:/srv/git/qdb
url.ssh://git.corp:29418/mmsx.insteadof=ssh://git.corp/srv/git/qdb
url.ssh://git.corp:29418/mmsx.insteadof=ssh://git.corp:29418/qdb
url.ssh://git.corp:29418/mmsx.insteadof=[email protected]:qdb
url.ssh://git.corp:29418/mmsx.insteadof=git.corp:/srv/git/qrrd
url.ssh://git.corp:29418/mmsx.insteadof=ssh://git.corp/srv/git/qrrd
url.ssh://git.corp:29418/mmsx.insteadof=ssh://git.corp:29418/qrrd
url.ssh://git.corp:29418/mmsx.insteadof=[email protected]:qrrd
url.ssh://git.corp:29418/mmsx.insteadof=ssh://git.corp:29418/platform
rerere.enabled=true
submodule.platform.update=!/srv/tools/share/scripts/git-submodule-update.sh
submodule.lib-common.update=!/srv/tools/share/scripts/git-submodule-update.sh
tig.bind.generic=r !git rebase -i %(commit)
tig.bind.generic=p @sh -c "echo -n %(commit) | xclip"
tig.bind.generic=f !git commit --fixup=%(commit)
pull.rebase=true
maintenance.repo=/home/ilan/dev/mmsx-master
maintenance.repo=/home/ilan/dev/mmsx-2022-dev
maintenance.repo=/home/ilan/dev/mmsx-4
alias.gl=config --global -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.fsmonitor=false
core.untrackedcache=true
remote.origin.url=ssh://git.corp:29418/mmsx
remote.origin.fetch=+refs/heads/:refs/remotes/origin/
submodule.platform/lib-common.active=true
submodule.platform/lib-common.url=ssh://git.corp:29418/lib-common
submodule.platform/www/modules/tcpdf/external.active=true
submodule.platform/www/modules/tcpdf/external.url=ssh://git.corp:29418/tcpdf
remote.mob.url=ssh://git.corp:29418/mmsx-mob.git
remote.mob.fetch=+refs/heads/:refs/remotes/mob/
branch.2022-dev.remote=origin
branch.2022-dev.merge=refs/heads/2022-dev
maintenance.auto=false
maintenance.strategy=incremental
log.excludedecoration=refs/prefetch/
submodule.platform.active=true
submodule.platform.url=ssh://git.corp:29418/platform
submodule.platform/www/modules/core/htdocs/javascript/ext/ckeditor-releases.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/ckeditor-releases.url=ssh://git.corp:29418/ckeditor-releases
submodule.platform/www/modules/core/htdocs/javascript/ext/jasmine.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/jasmine.url=ssh://git.corp:29418/jasmine
submodule.platform/www/modules/core/htdocs/javascript/ext/jasmine-jquery.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/jasmine-jquery.url=ssh://git.corp:29418/jasmine-jquery
branch.geom.remote=mob
branch.geom.merge=refs/heads/ilan/geom-minimal-lib
branch.2024-dev.remote=origin
branch.2024-dev.merge=refs/heads/2024-dev
branch.ARCHIVE-preview.remote=mob
branch.ARCHIVE-preview.merge=refs/heads/ilan/keyword-replacement
submodule.platform/www/modules/core/htdocs/javascript/ext/highcharts.com.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/highcharts.com.url=ssh://git.corp:29418/highcharts.com
submodule.platform/www/modules/core/htdocs/javascript/ext/jsplumb.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/jsplumb.url=ssh://git.corp:29418/jsplumb
submodule.platform/www/modules/core/htdocs/javascript/ext/pace.active=true
submodule.platform/www/modules/core/htdocs/javascript/ext/pace.url=ssh://git.corp:29418/pace
Lazy git config
os:
edit: "command nvim --server $NVIM --remote-send "<C-\>:FromFTToTab {{filename}}""
editAtLine: "command nvim --server $NVIM --remote-send "<C-\>:FromFTToTab {{filename}} {{line}}""
openDirInEditor: "command nvim --server $NVIM --remote-send "<C-\>:FromFTToTab {{filename}}""
open: "command nvim --server $NVIM --remote-send "<C-\>:FromFTToTab {{filename}}""
customCommands:
- key: 'G'
showOutput: true
context: 'global'
command: 'git push-for {{.Form.Branch | quote}}'
prompts:- type: 'input'
title: 'Which branch ?'
key: 'Branch'
initialValue: '2024-dev'
suggestions:
preset: 'branches' # use built-in logic for obtaining branches
- type: 'input'
- key: 'b'
showOutput: true
context: 'files'
command: 'git absorb' - key: 'B'
showOutput: true
context: 'files'
command: 'git absorb --and-rebase'
gui:
nerdFontsVersion: "3"
The number of lines you scroll by when scrolling the main window
scrollHeight: 10
commitHashLength: 3
disableStartupPopups: true
git:
commit:
autoWrapWidth: 72
log:
order: default
Note: please try updating to the latest version or manually building the latest master
to see if the issue still occurs.
I won't do master but I have a super fresh version and the behaviour was also exhibited by 0.42. It's a not a new behaviour and unlikely to change in master as 0.45.2 is super new.