mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-25 22:01:14 +02:00
Git has a bug [1] whereby running multiple fetch commands at the same time causes all of them to append their information to the .git/FETCH_HEAD file, causing the next git pull that wants to use the information to become confused, and show an error like "Cannot rebase onto multiple branches". This error would occur when pressing "f" and "p" in quick succession in the files panel, but also when pressing "p" while a background fetch happens to be running. One likely situation for this is pressing "p" right after startup. Since lazygit never uses the information written to .git/FETCH_HEAD, it's best to avoid writing to it, which fixes the scenarios described above. However, it doesn't fix the problem of repeatedly pressing "f" quickly on the checked-out branch; since we call "git pull" in that case, the above fix doesn't help there. We'll address this separately in another PR. [1] See https://public-inbox.org/git/xmqqy1daffk8.fsf@gitster.g/ for more information.