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

Unable to git stage submodule updates #211508

Open
brucejo75 opened this issue Apr 27, 2024 · 2 comments
Open

Unable to git stage submodule updates #211508

brucejo75 opened this issue Apr 27, 2024 · 2 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@brucejo75
Copy link

brucejo75 commented Apr 27, 2024

Type: Bug

  1. in main git repo: add a submodule
  2. in submodule: make changes to a file
  3. in submodule: push changes to origin for clean repo
  4. in main git repo: notice that you now have a change to the submodule folder.
  5. In VSCode: attempt to stage the changed submodule folder.
    Result: nothing

Found these lines in the gitlog:

2024-04-26 18:50:35.399 [info] > git ls-tree -l index -- /home/brucejo/clones/@merislive/configl/clones/configshared [17ms]
2024-04-26 18:50:35.399 [info] fatal: Not a valid object name index

VS Code version: Code 1.88.1 (e170252, 2024-04-10T17:41:02.734Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.146.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.146.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 x 3411)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: unavailable_off
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: unavailable_off
webgpu: enabled
Load (avg) undefined
Memory (System) 15.71GB (2.97GB free)
Process Argv --folder-uri vscode-remote://wsl%2Bubuntu/home/brucejo/clones/%40merislive/configl --crash-reporter-id be1b5572-5620-43a3-af3d-48a0cb28340b
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.146.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 x 3411)
Memory (System) 7.76GB (5.33GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.146.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 x 3411)
Memory (System) 7.76GB (5.33GB free)
VM 0%
Extensions (25)
Extension Author (truncated) Version
vscode-eslint dba 2.4.4
prettier-vscode esb 10.4.0
copilot Git 1.184.0
copilot-chat Git 0.14.1
bash-ide-vscode mad 1.39.0
rainbow-csv mec 3.11.0
git-graph mhu 1.30.0
bash-debug rog 0.3.9
svelte-vscode sve 108.4.0
shellcheck tim 0.37.1
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.3.1
LogFileHighlighter emi 2.18.0
remotehub Git 0.62.0
vscode-systemd-support han 2.2.0
remote-containers ms- 0.354.0
remote-ssh ms- 0.110.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.88.0
vscode-remote-extensionpack ms- 0.25.0
azure-repos ms- 0.38.0
remote-explorer ms- 0.4.3
remote-repositories ms- 0.40.0
remote-server ms- 1.5.1
vscode-caddyfile-syntax zam 1.0.4
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
d6fi2104:30959263
cppperfnew:31000557
8082a590:30971561
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
jg8ic977:31013176
pythoncenvpt:31022790

@lszomoru
Copy link
Member

in main git repo: notice that you now have a change to the submodule folder.

VS Code renders the contents of the "Source Control" view by running git status and parsing the output. What happens if you run git status in the main repository? Does the submodule folder appears in the output as modified?

@lszomoru lszomoru added git GIT issues info-needed Issue requires more information from poster labels May 30, 2024
@brucejo75
Copy link
Author

@lszomoru,
Yes.
That is my workaround...

$ git status
"... shows that the submodule is changed and instructs me to "add" it..."
$ git add submodule

Then I go back to VSCode to add the comment and commit.

PS: you can probably tell by the System Info, I am using this remote to WSL 2. (if that gives any clues)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants