Vendored tree-sitter-gitcommit
  • JavaScript 72.4%
  • Python 14.6%
  • CMake 6.6%
  • C 4.6%
  • Tree-sitter Query 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-14 02:15:26 +02:00
.github/workflows fix: add scanner.c to binding.gyp sources 2026-03-05 15:02:26 +01:00
bindings Fix unsafe extern block for Rust 2024 2026-04-13 21:34:49 +02:00
queries feat: remove overflow warning (#68) 2024-07-01 17:12:38 +02:00
src feat: update langs 2026-03-06 09:26:38 +01:00
test/corpus fix: trailers values and breaking changes values could be multilines (#77) 2025-03-13 09:06:26 +01:00
.editorconfig chore: upgrade tree-sitter (#69) 2024-06-26 15:01:12 +02:00
.gitattributes chore: upgrade tree-sitter (#69) 2024-06-26 15:01:12 +02:00
.gitignore upgrade languages (#73) 2024-10-18 08:55:35 +02:00
.prettierrc chore: updates workflows (#35) 2023-04-18 09:41:55 +02:00
binding.gyp fix: add scanner.c to binding.gyp sources 2026-03-05 15:02:26 +01:00
Cargo.toml Fix tree-sitter-language path to use ../../ 2026-04-14 02:15:26 +02:00
CMakeLists.txt chore: bump version 2026-03-09 14:08:01 +01:00
CODE_OF_CONDUCT.md Initial commit 2022-11-11 14:06:34 +01:00
CONTRIBUTING.md docs: introduce CONTRIBUTING.md 2023-04-06 10:57:41 +02:00
go.mod fix: add scanner.c to binding.gyp sources 2026-03-05 15:02:26 +01:00
grammar.js feat: update langs 2026-03-06 09:26:38 +01:00
LICENCE Initial commit 2022-11-11 14:06:34 +01:00
Makefile chore: upgrade tree-sitter (#69) 2024-06-26 15:01:12 +02:00
package-lock.json chore: bump version 2026-03-09 14:08:01 +01:00
package.json chore: bump version 2026-03-09 14:08:01 +01:00
Package.swift fix: add scanner.c to Swift binding sources 2026-03-05 15:02:26 +01:00
parse-lang.py feat: automatic lang update (#74) 2024-10-21 09:43:20 +02:00
pyproject.toml chore: bump version 2026-03-09 14:08:01 +01:00
README.md feat: automatic lang update (#74) 2024-10-21 09:43:20 +02:00
setup.py fix: add scanner.c to Python binding sources 2026-03-05 15:02:26 +01:00
tree-sitter-gitcommit.wasm Initial commit 2022-11-11 14:06:34 +01:00
tree-sitter.json chore: bump version 2026-03-09 14:08:01 +01:00

tree-sitter-gitcommit

Build/test

gitcommit grammar for tree-sitter.

Features

Supported locales

We aim to support all the locales supported by git. The currently supported locales are listed below:

  • en: English
  • bg: Bulgarian
  • ca: Catalan
  • de: German
  • el: Greek
  • es: Spanish
  • fr: French
  • id: Indonesian (Bahasa)
  • it: Italian
  • ko: Korean
  • pl: Polish
  • pt_PT: Portugal Portugese
  • ru: Russian
  • sv: Swedish
  • tr: Turkish
  • vi: Vietnamese
  • zh_CN: Chinese (Simplified)
  • zh_TW: Taiwanese Mandarin

Note about injected languages

This parser only parses git commit subject, message and generated comments, it doesn't handle diff and git rebase information that could be included. To handle that, you must have diff and git_rebase tree-sitter grammars installed and add injection queries.

If you're using Neovim and nvim-treesitter, you just have to be sure that diff and git_rebase are installed (using TSInstall diff git_rebase for example).

Upgrade translations

There is python script to upgrade translations from git source code. It will search for all translations in all tagged versions of git from the v2.30.2. So this parser should be compatible with all git versions from v2.30.2.

To upgrade translations, run:

python parse-lang.py

Credits