Add .gitconfig enabling diff'ing for encrypted .age files

This commit is contained in:
2024-11-08 17:35:11 -06:00
parent ab47f6832f
commit 12ad0c0d2f
3 changed files with 10 additions and 1 deletions

3
.gitattributes vendored
View File

@@ -7,4 +7,5 @@ dot_profile linguist-language=Shell
dot_gitconfig linguist-language=TOML linguist-detectable
*.toml linguist-detectable
*.toml.tmpl linguist-language=TOML linguist-detectable
*.cfg.tmpl linguist-language=INI linguist-detectable
*.cfg.tmpl linguist-language=INI linguist-detectable
*.age diff=age

2
.gitconfig Normal file
View File

@@ -0,0 +1,2 @@
[diff "age"]
textconv = "age -d -i ~/key.txt"

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# We just need to have access to the Git repository
cd {{ .chezmoi.sourceDir }}
# The path is relative to the .git/config file
git config --local include.path ../.gitconfig