You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
FAILED errors are appearing in the GitLens logs. Perhaps these are harmless, though I've isolated the issues and perhaps it can be fixed.
At some part of the GitLens startup on a repo, it is doing several activities which include getting the user.name and user.email. However, the regex that is given is not within quotes or shell escaped. Therefore, it fails due to special characters like the following three )(|. Naturally, there are even more special characters recognized by the cmd, power, sh, and bash shells.
Running(n:/opsworkspace/zfs-auto-snapshot): git blame --root --incremental -- Makefile
Completed(n:/opsworkspace/zfs-auto-snapshot): git blame --root --incremental -- Makefile Completed in 1297 ms
Running(n:/opsworkspace/zfs-auto-snapshot): git config --get-regex user.(name|email)
FAILED(n:/opsworkspace/zfs-auto-snapshot): git config --get-regex user.(name|email) FAILED in 259 ms
getBlameForRangeSync('n:/opsworkspace/zfs-auto-snapshot', 'n:\opsworkspace\zfs-auto-snapshot\Makefile', 'undefined', [0, 28])
GitLens (git)
[2018-10-14 01:19:37:561] git rev-parse --show-toplevel Completed in 460 ms (n:\opsworkspace\zfs-auto-snapshot)
[2018-10-14 01:19:38:121] git remote -v Completed in 527 ms (n:/opsworkspace/zfs-auto-snapshot)
[2018-10-14 01:19:38:542] git ls-files Makefile Completed in 409 ms (n:/opsworkspace/zfs-auto-snapshot)
[2018-10-14 01:19:38:543] git ls-files Makefile Completed in 403 ms (n:/opsworkspace/zfs-auto-snapshot)
[2018-10-14 01:19:38:924] git ls-files n:\opsworkspace\zfs-auto-snapshot\Makefile Completed in 379 ms (n:/opsworkspace/zfs-auto-snapshot)
[2018-10-14 01:19:40:225] git blame --root --incremental -- Makefile Completed in 1297 ms (n:/opsworkspace/zfs-auto-snapshot)
[2018-10-14 01:19:40:485] git config --get-regex user.(name|email) FAILED in 259 ms (n:/opsworkspace/zfs-auto-snapshot)
Error: Command failed: C:\njs\wslgit\wslgit.exe -c core.quotepath=false -c color.ui=false config --get-regex user.(name|email)
/bin/bash: -c: line 0: syntax error near unexpected token `('
/bin/bash: -c: line 0: `cd /mnt/n/opsworkspace/zfs-auto-snapshot && git -c core.quotepath=false -c color.ui=false config --get-regex user.(name|email)'
Workaround
None known.
If the commands are sent to a command interpreter (cmd, bash, sh, etc.) then special characters must be escaped or quoted. It is possible to bypass a command interpreter, however, that may be a substantial change to codebase.
Since the escaping method and special characters are different in each command interpreter, the code will likely need to take the most common approach -or- create a conditional escaping mechanism.
Below are three quick ways of escaping/quoting. Of these three, only the third (double quotes) may work in all three shells (cmd, bash, and sh). Maybe....
FAILED errors are appearing in the GitLens logs. Perhaps these are harmless, though I've isolated the issues and perhaps it can be fixed.
At some part of the GitLens startup on a repo, it is doing several activities which include getting the user.name and user.email. However, the regex that is given is not within quotes or shell escaped. Therefore, it fails due to special characters like the following three
)(|
. Naturally, there are even more special characters recognized by the cmd, power, sh, and bash shells.The command attempted is:
This will fail in many cases:
|
pipe and try to route output to an executable namedemail)
. The specific error that CMD will give is:(
and fail with the error:Setup
Extension version: 8.5.6
VS Code version: Code 1.28.1 (3368db6750222d319c851f6d90eb619d886e08f5, 2018-10-11T18:13:53.910Z)
OS version: Windows_NT x64 10.0.17763
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Steps to Reproduce
Expected
No errors in GitLens logs
Actual Result
GitLens
GitLens (git)
Workaround
None known.
If the commands are sent to a command interpreter (cmd, bash, sh, etc.) then special characters must be escaped or quoted. It is possible to bypass a command interpreter, however, that may be a substantial change to codebase.
Since the escaping method and special characters are different in each command interpreter, the code will likely need to take the most common approach -or- create a conditional escaping mechanism.
Below are three quick ways of escaping/quoting. Of these three, only the third (double quotes) may work in all three shells (cmd, bash, and sh). Maybe....
git config --get-regex user.(name|email)
git config --get-regex 'user.(name|email)'
git config --get-regex "user.(name|email)"
The text was updated successfully, but these errors were encountered: