Microsoft/vscode

Git - quick diff indicator does not work with global textconv

Open

#113,609 建立於 2020年12月31日

在 GitHub 查看
 (0 留言) (0 反應) (1 負責人)TypeScript (74,848 star) (10,221 fork)batch import
buggithelp wanted

描述

  • VSCode Version: 1.53.0-insider
  • OS Version: Ubuntu 20.10

Steps to Reproduce:

  1. Clone the repository at https://github.com/septatrix/vscode-git-attributes-filter
  2. Copy the commented section from .gitconfig to ~/.gitconfig.
  3. Open the directory in vscode and then open the file sample.txt
  4. Even though everything is up to date vscode will show the first line as new.

Does this issue occur when all extensions are disabled?: Yes

Other info:

The corresponding output from git itself:

$ cat sample.txt
# global diff textconv
# local diff textconv
$ tail -n 2 ~/.gitconfig
[diff "globaltxt"]
        textconv = "grep -v '^# global'"
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ git show :sample.txt
# global diff textconv
# local diff textconv
$ git show --textconv :sample.txt
# local diff textconv

When changing the diff attribute in .gitattributes to localtxt everything works as expected. This may be some special case of #83232 when the text conversion (like diff or filter) is globally defined.

貢獻者指南