vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

The Graph does not displays all the branches after doing a rebase with conflicts

Open ericf-axosoft opened this issue 3 years ago • 1 comments

Description

Steps to reproduce the problem:

  1. Open a repository in Gitlens.
  2. Create 2 branches and modify the same file to produce a conflict if we do a rebase.
  3. Open the Commit Graph webview.
  4. Open a terminal and run git rebase[YOUR_BRANCH] —committer-date-is-author-date (replace [YOUR_BRANCH] by your branch name. For example main).
  5. Git should display a warning because a conflict.
  6. Click the Commit Graph webview.

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 --abort we 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 --abort and click the Commit Graph webview.
  • Or just close and reopen the folder repository and the Commit Graph webview.

GitLens Version

12.0.0

VS Code Version

No response

Git Version

No response

Logs, Screenshots, Screen Captures, etc

Before rebase Captura de pantalla 2022-09-05 a las 10 27 25 After rebase Captura de pantalla 2022-09-05 a las 14 08 38

https://user-images.githubusercontent.com/90025366/188598114-a302e961-a082-48f6-bbaa-cad0c4c95328.mov

ericf-axosoft avatar Sep 06 '22 09:09 ericf-axosoft

It seems that the problem is produced by line 474 of graphWebview.ts: Captura de pantalla 2022-09-15 a las 9 24 29

Changing that line to { limit: limit, ref: 'HEAD' } works but I suppose something will stop working properly 🤷

ericf-axosoft avatar Sep 15 '22 07:09 ericf-axosoft

@axosoft-ramint @eamodio I'm closing this issue as it seems to be fixed with the latest changes. Tested and works fine.

ericf-axosoft avatar Oct 14 '22 13:10 ericf-axosoft

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.

github-actions[bot] avatar Nov 18 '22 05:11 github-actions[bot]