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.Dismiss alert
{{ message }}
Repository navigation
Terminal links for git diffs do not work with mnemonic prefixes #302823
In a git repository with some changes made, run git -c diff.mnemonicPrefix=true diff to see the diff with the mnemonicPrefix config enabled; this uses different prefixes instead of a/ and b/ to show more detail about the source of the files in the diff view.
When this option is enabled, the link detection in the terminal no longer creates correct links (i.e., stripping the prefix):
The correct link here is just gitconfig, but the underline (from cmd-mouseover) shows a link was created for w/gitconfig instead.
VS Code version: Code 1.109.4 (Universal) (c3a2684, 2026-02-16T15:35:57.932Z)
OS version: Darwin arm64 25.3.0
Remote OS version: Linux arm64 6.8.0-1047-aws
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.112.0. Please try upgrading to the latest version and checking whether this issue remains.
Sharing media and context from merged PR #298490 for verification:
Git supports a config option diff.mnemonicPrefix that sometimes uses characters other than a/ and b/ in diffs to distinguish where they came from. This PR updates the link parsing in the integrated terminal, so file paths are still detected when this option is enabled.
I updated the existing tests for this functionality.
Manual testing
Make some change in a git repo (e.g. echo "hello world" >>README.md).
Enable this config option and run git diff: git -c diff.mnemonicPrefix=true diff in the terminal will now be comparing the index and the working copy files:
diff --git i/README.md w/README.md
index 6f1e94e4844..0dc323dc715 100644
--- i/README.md+++ w/README.md@@ -76,3 +76,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the [MIT](LICENSE.txt) license.
+hello world
With this change, README.md in each location should be underlined on hover and possible to open with ⌘/ctrl+click.
Notably, cmd-click will open README.md, and not attempt to find a file named w/README.md
Activity
vs-code-engineering commentedon Mar 18, 2026
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.112.0. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
vs-code-engineering commentedon Jul 13, 2026
Sharing media and context from merged PR #298490 for verification:
Git supports a config option
diff.mnemonicPrefixthat sometimes uses characters other thana/andb/in diffs to distinguish where they came from. This PR updates the link parsing in the integrated terminal, so file paths are still detected when this option is enabled.I updated the existing tests for this functionality.
Manual testing
Make some change in a git repo (e.g.
echo "hello world" >>README.md).Enable this config option and run git diff:
git -c diff.mnemonicPrefix=true diffin the terminal will now be comparing theindex and theworking copy files:With this change,
README.mdin each location should be underlined on hover and possible to open with ⌘/ctrl+click.Notably, cmd-click will open
README.md, and not attempt to find a file namedw/README.mdSource PR: #298490