vscode-gitlens
vscode-gitlens copied to clipboard
The Graph does not displays all the branches after doing a rebase with conflicts
Description
Steps to reproduce the problem:
- Open a repository in
Gitlens. - Create 2 branches and modify the same file to produce a conflict if we do a rebase.
- Open the
Commit Graphwebview. - Open a terminal and run
git rebase[YOUR_BRANCH] —committer-date-is-author-date(replace [YOUR_BRANCH] by your branch name. For examplemain). - Git should display a warning because a conflict.
- Click the
Commit Graphwebview.
Actual result:
- The Graph displays only the current selected branch in that case. It seems to be because Gitlens gets the commits by taking into account the selected SHA instead of using HEAD.
- By doing a
rebase --abortwe still not see all the repository branches.
Expected result:
- The graph should display all the repository branches.
Work around:
- Select the main branch, open a terminal and run
rebase --abortand click theCommit Graphwebview. - Or just close and reopen the folder repository and the
Commit Graphwebview.
GitLens Version
12.0.0
VS Code Version
No response
Git Version
No response
Logs, Screenshots, Screen Captures, etc
Before rebase
After rebase

https://user-images.githubusercontent.com/90025366/188598114-a302e961-a082-48f6-bbaa-cad0c4c95328.mov
It seems that the problem is produced by line 474 of graphWebview.ts:

Changing that line to { limit: limit, ref: 'HEAD' } works but I suppose something will stop working properly 🤷
@axosoft-ramint @eamodio I'm closing this issue as it seems to be fixed with the latest changes. Tested and works fine.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.