Microsoft/vscode

Git - quick diff indicator does not work with global textconv

Open

#113,609 opened on Dec 31, 2020

View on GitHub
 (0 comments) (0 reactions) (1 assignee)TypeScript (74,848 stars) (10,221 forks)batch import
buggithelp wanted

Description

  • 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.

Contributor guide