From: ObserverOfTime Date: Fri, 9 Sep 2022 13:11:41 +0000 (+0100) Subject: patch 9.0.0424: gitattributes files are not recognized X-Git-Tag: v9.0.0424 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d56cfc861e57145f003315efd835cf5dfd5b145;p=vim patch 9.0.0424: gitattributes files are not recognized Problem: gitattributes files are not recognized. Solution: Add patterns to match gitattributes files. (closes #11085) --- diff --git a/runtime/filetype.vim b/runtime/filetype.vim index f445d7cb0..d9e143327 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -720,7 +720,11 @@ au BufNewFile,BufRead *.git/worktrees/*/config.worktree setf gitconfig au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig if !empty($XDG_CONFIG_HOME) au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/attributes setf gitattributes endif +au BufNewFile,BufRead .gitattributes,*.git/info/attributes setf gitattributes +au BufNewFile,BufRead */.config/git/attributes setf gitattributes +au BufNewFile,BufRead */etc/gitattributes setf gitattributes au BufNewFile,BufRead git-rebase-todo setf gitrebase au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail au BufNewFile,BufRead *.git/* diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 33b0894b2..b70a9fe87 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -213,6 +213,7 @@ let s:filename_checks = { \ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'], \ 'gemtext': ['file.gmi', 'file.gemini'], \ 'gift': ['file.gift'], + \ 'gitattributes': ['file.git/info/attributes', '.gitattributes', '/.config/git/attributes', '/etc/gitattributes', '/usr/local/etc/gitattributes', 'some.git/info/attributes'], \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 'NOTES_EDITMSG', 'EDIT_DESCRIPTION'], \ 'gitconfig': ['file.git/config', 'file.git/config.worktree', 'file.git/worktrees/x/config.worktree', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/usr/local/etc/gitconfig', '/etc/gitconfig.d/file', 'any/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'], \ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'], diff --git a/src/version.c b/src/version.c index 445ac6dde..24c99fd4e 100644 --- a/src/version.c +++ b/src/version.c @@ -703,6 +703,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 424, /**/ 423, /**/