Description
The current parser doesn't support dirty submodules. It errors out. See example below.
Steps to Reproduce
- Run the following command to generate a test file
$ cat << EOF > a.COMMIT_EDITMSG
feat(vim): some title text
This commit_editmsg comes from a real life example, in a repository containing a
dirty submodule.
#
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is ahead of 'origin/master' by 8 commits.
# (use "git push" to publish your local commits)
#
# Changes to be committed:
# modified: ../../../.config/nvim/after/ftplugin/markdown.vim
#
# Changes not staged for commit:
# modified: ../../../.config/nvim/lua/xkcd/plugins/nvim-tree.lua
# modified: ../../../.config/setup-scripts-submodule (modified content)
# vim: ft=gitcommit:noexpandtab
EOF
The offending line is the final modified line, above the vim modeline.
- Then
tree-sitter parse a.COMMIT_EDITMSG to run the query or via neovim treesitter Playground, you can see the errors highlighted in red.

Expected output
No error when parsing.
Description
The current parser doesn't support dirty submodules. It errors out. See example below.
Steps to Reproduce
The offending line is the final
modifiedline, above the vim modeline.tree-sitter parse a.COMMIT_EDITMSGto run the query or via neovim treesitter Playground, you can see the errors highlighted in red.Expected output
No error when parsing.