Skip to content

"We couldn't find commit" when submodules exist #1499

@matejcik

Description

@matejcik

Issue Type: Bug

In review mode, clicking on any file in "changes in pull request" at all will yield the error "We couldn't find commit", and the diff will be empty or just contain the full text of the remote file.

to reproduce:

  1. open a project with no submodules
  2. check out a pull request locally, verify that the review mode generally works
  3. close vscode
  4. use git submodule add to add a submodule. (e.g.: make a local checkout of a different git repo, then in the original one, git submodule add ../path/to/checkout submodule1)
  5. open vscode again
  6. Github Pull Request extension is now confused and not showing any PRs
  7. navigate to Source Control and make sure only the original repository, not the submodule, is selected
  8. go back to Github Pull Request extension, see that PRs are visible again
  9. in "changes in pull request" (should be available from last time), click on any file. The "we couldn't find commit" message will pop up and the display will be wrong.

The commits in question exist (as can be verified by git in the command line), but the "Git" output window shows errors on them. Presumably the commands are called on the wrong repository.

The problem affects the stable version of the extension as well.

Extension version: 2020.2.8161
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:50:36.977Z)
OS version: Linux x64 4.15.0-88-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 2654)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 15.56GB (3.06GB free)
Process Argv . --no-sandbox
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions