phil294 / GitLG

A free, interactive Git UI for VSCode
MIT License
148 stars 12 forks source link

Selecting a stash throws an unexpected error #112

Open buddybu opened 2 weeks ago

buddybu commented 2 weeks ago

Selecting a stash (without a description), throws an error:

GitLG: An unexpected error happened. Error summary: {"error_response":"usage: git stash show [<options>] [<stash>]\n\n\n","request":{"command":"git","data":"-c core.quotepath=false stash show --include-untracked --numstat --summary --format=\"\" 8fb1d953a","id":47,"type":"request-from-web"}}

https://vuejs.org/error-reference/#runtime-3. For details, see VSCode developer tools console. Please consider reporting this error.

I am using v0.1.21 of the extension in Ubuntu 22.04 VSCode version

Version: 1.94.2
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-45-generic

Please let me know what other information I can provide.

buddybu commented 2 weeks ago

Additionally I am running within a Remove Devcontainer. My git version is 2.30.2. From what I can tell from the command line being displayed, git does not like the parameter --include-untracked.

phil294 commented 1 week ago

Hi! This is the first time I'm hearing of this problem.

Git v2.30.2 is 3.5 years old: https://github.com/git/git/commits/master/Documentation/RelNotes/2.30.2.txt

The version shipped with Ubuntu 22.04 is 2.34.1 https://launchpad.net/ubuntu/jammy/+source/git, 3 years old: https://github.com/git/git/blob/master/Documentation/RelNotes/2.34.1.txt

Option --include-untracked however was introduced with version 1.7.8 https://github.com/git/git/commit/7f41b6bbe3181dc4d1687db036bf22316997a1bf#diff-42319772e8fb97d341d8f749aa5169a5183a700b8b8c394d2c4048bea51df82aR40 13 years ago.

So something's not right here. Can you please have another look? - copy and run the failing command git -c core.quotepath=false stash show --include-untracked --numstat --summary --format="" 8fb1d953a via command line, verify the Git version and figure out why it fails.

buddybu commented 1 week ago

I am running in a VSCode remote dev-container, so it could be the base image of the docker container. It is currently debian:bullseye. I will work wiith the maintainer of the container and see if we can't upgrade it to debian:latest.

Git version output from the docker container.

> git --version
git version 2.30.2

But on the docker container, in the same folder, using the version 2.30.2 of git, I get:

> git -c core.quotepath=false stash show --include-untracked --numstat --summary --format="" 8fb1d953a
usage: git stash show [<options>] [<stash>]

On the host OS, git is version 2.34.1 and the command you asked me to run worked great.

> git -c core.quotepath=false stash show --include-untracked --numstat --summary --format="" 8fb1d953a
61      0       utils/dlopen_test/CMakeLists.txt
122     0       utils/dlopen_test/dlopen_test.c
 create mode 100644 utils/dlopen_test/CMakeLists.txt
 create mode 100644 utils/dlopen_test/dlopen_test.c