Skip to content

Interactive rebase editor not opening git-rebase-todo properly #1387

@raphinesse

Description

@raphinesse

Issue Type: Bug

About every other time I start an interactive rebase (from a terminal) the editor comes up empty (No commits to rebase). However, the editor tab has an unsaved-indicator and if I inspect the contents of .git/rebase-merge/git-rebase-todo by other means, the file looks OK.

When aborting the rebase from the editor, the editor closes but I get an error notification stating

Failed to save 'git-rebase-todo': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes.

which I dismiss by choosing Overwrite. This finally aborts the rebase with the usual terminal message "error: nothing to do".

The GitLens log only outputs a line at the very end of this process:

[~/example/.git/rebase-merge] Git Command failed: /usr/bin/git -c core.quotepath=false -c color.ui=false rev-parse --show-toplevel • this operation must be run in a work tree • 16 ms 

To me, this seems like a race condition. Like GitLens is reading the contents of the file before git finished writing or something like that. I could not reproduce this problem when using the plain text editor.

Extension version: 11.2.1
VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:48:44.518Z)
OS version: Linux x64 5.4.0-65-generic snap

System Info
Item Value
CPUs AMD Athlon(tm) II X4 635 Processor (4 x 800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 11.70GB (0.29GB free)
Process Argv . --no-sandbox --crash-reporter-id d34e3cdb-1dc7-4dd6-8553-78926379d0e2
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11

Metadata

Metadata

Assignees

No one assigned

    Labels

    inactiveIssue has not had recent required feedbackneeds-more-infoNeeds further information, steps, details, etc.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions