Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLens Interactive Rebase UI does not start when starting rebase from shell #2294

Open
jkwuc89 opened this issue Oct 24, 2022 · 8 comments
Open
Labels
area-rebase-editor Issues or features related to the Interactive Rebase Editor bug Something isn't working triage Needs to be looked at

Comments

@jkwuc89
Copy link

jkwuc89 commented Oct 24, 2022

Description

On macOS Ventura 12.6 with iTerm 3.4.16 and zshell:

When I start an interactive git rebase via git rebase -i, Visual Studio Code opens git-rebase-todo in a standard editor pane instead of GitLens starting its interactive rebase UI.

I have GitLens rebase turned on and in my .gitconfig, I added editor = code --wait.

When I uninstall GitLens and then, reinstall it, the GitLens rebase UI will briefly start working again but will eventually revert back to the VSCode standard editor after a few rebases.

GitLens Version

13.0.3

VS Code Version

Version: 1.72.2 (Universal)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:16:30.254Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

Git Version

git version 2.38.1

Logs, Screenshots, Screen Captures, etc

No response

@jkwuc89 jkwuc89 added potential-bug triage Needs to be looked at labels Oct 24, 2022
@eamodio eamodio added needs-more-info Needs further information, steps, details, etc. and removed triage Needs to be looked at labels Nov 12, 2022
@eamodio
Copy link
Member

eamodio commented Nov 12, 2022

We believe this issue should be resolved in the latest pre-release edition of GitLens. Can you please give it a try to confirm that the issue is resolved for you? Thanks!

You can switch to the pre-release edition of GitLens, by clicking on the "Switch to Pre-Release version of this extension" from the Extensions view.

image

@jkwuc89
Copy link
Author

jkwuc89 commented Nov 13, 2022

This morning, I uninstalled/reinstalled the latest GitLens pre-release version and rebasing within VSCode is still using its based editor. The screenshot below shows the version of GitLens I am using and the screencast below shows what happens when I rebase. Please let me know if you would like me to collect and provide any additional information.

Screenshot 2022-11-13 at 9 48 01 AM

gitlens-rebase

@mistergraphx
Copy link

I encounter the same bug with mac os Monterey even if i start the rebase from vsCode terminal or iTerm.

Using the pre-release version the interactive rebase UI appear one time and switch to normal text editor commit message after.

@Smayke95
Copy link

I have the same issue.

If I type: git rebase -i HEAD~3 it will only open VS Code Text Editor
image

But, if I first open VS Code and then use: git rebase -i HEAD~3, then Git Lens will work
image

I tried different versions of Git Lens (including prelease) but nothing fixed the issue. And I tried to to enter command with Git CMD, CMD and Visual Studio but nothing worked. Also all my friends have the same issue.

I'm using Windows 10 Pro and this is VS Code version:
image

@github-actions github-actions bot added the inactive Issue has not had recent required feedback label Nov 29, 2022
@gitkraken gitkraken deleted a comment from github-actions bot Nov 29, 2022
@eamodio eamodio added triage Needs to be looked at and removed needs-more-info Needs further information, steps, details, etc. inactive Issue has not had recent required feedback labels Nov 29, 2022
@eamodio eamodio added bug Something isn't working and removed potential-bug labels Apr 11, 2023
@mbcrawfo
Copy link

I am encountering this problem as well. It seems like the editor fails to load correctly when it opens in a new VS Code window. My sequence.editor command was code --wait --new-window, and it now fails to load the editor 100% of the time. When I remove --new-window the behavior seems to be consistent. If VS Code window is already open when I do the rebase, the editor loads. It doesn't seem to matter what is open in VS Code (even no file or folder), just the fact that it's already open. If VS Code is not open, the editor fails to load.

When the editor fails to load I get the following errors in the GitLens output:

[2023-04-21 20:25:49.117] [GIT  ] [c:\Users\xxx\Projects\xxx\.git\rebase-merge] git rev-parse --show-toplevel • Command failed: C:\Program Files\Git\cmd\git.exe -c core.longpaths=true -c core.quotepath=false -c color.ui=false rev-parse --show-toplevel • this operation must be run in a work tree • 154 ms

[2023-04-21 20:25:49.241] [GIT  ] [c:\Users\xxx\Projects\xxx\.git] git rev-parse --show-toplevel • Command failed: C:\Program Files\Git\cmd\git.exe -c core.longpaths=true -c core.quotepath=false -c color.ui=false rev-parse --show-toplevel • this operation must be run in a work tree • 63 ms

@johnhunter
Copy link

Further to @Smayke95 's #2294 (comment), when I use interactive rebase in the VSCode terminal the Gitlens UI does not launch. But if I use an external terminal app it opens the UI as expected.

Steps:

  1. With .gitconfig setting editor = code --wait
  2. Open a local repo in VSCode
  3. Open the the VSCode integrated terminal
  4. Run git rebase -i HEAD~3

Expected:

GitLens Interactive Rebase UI is displayed

Actual:

  • Git .git/rebase-merge/git-rebase-todo file is opened
  • GitLens output log: [xxx.git] git rev-parse --show-toplevel • Command failed: /opt/homebrew/bin/git -c core.quotepath=false -c color.ui=false rev-parse --show-toplevel • this operation must be run in a work tree [4ms]

Environment:

  • MacOS 13.4.1 (Apple M1)
  • VSCode 1.81.1 (Universal)
  • GitLens v14.2.1
  • git 2.41.0

@Yohanna
Copy link

Yohanna commented Feb 14, 2024

I'm also hitting this issue on the latest releases. Similar to what others said, if I have VSCode already open, Interactive Rebase only works from my external terminal, iTerm, but not from VSCode's internal terminal.

The same issue seems to be reported earlier in #2051 and I've also started a discussion on the issue, but didn't receive any response.

Environment:

  • MacOS 14.2.1
  • VSCode 1.86.1
  • GitLens v14.8.0
  • Git v2.42.0

@PiterGoCompany
Copy link

For me interactive rebase works only if VS Code is already open.

@d13 d13 added the area-rebase-editor Issues or features related to the Interactive Rebase Editor label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-rebase-editor Issues or features related to the Interactive Rebase Editor bug Something isn't working triage Needs to be looked at
Projects
None yet
Development

No branches or pull requests

10 participants