Microsoft/vscode

Git - quick diff indicator does not work with global textconv

Open

#113.609 aberto em 31 de dez. de 2020

Ver no GitHub
 (1 comment) (0 reactions) (1 assignee)TypeScript (10.221 forks)batch import
buggithelp wanted

Métricas do repositório

Stars
 (74.848 stars)
Métricas de merge de PR
 (Mesclagem média 11h 43m) (1.000 fundiu PRs em 30d)

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.

Guia do colaborador