# vim: ft=gitattributes:
# global git attributes.
# see:
# 1. https://git-scm.com/docs/gitattributes
# 2. https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Keyword-Expansion
# 3. https://www.gnupg.org
# 4. https://wiki.archlinux.org/index.php/GnuPG
# * !filter !diff
# .gitattributes !filter !diff
# .gitignore !filter !diff
# .gitmodules !filter !diff

# git line endings
# https://github.com/github/docs/blob/main/content/get-started/git-basics/configuring-git-to-handle-line-endings.md

# set the default behavior, in case people dont have core.autocrlf set.
# auto detect text files and perform LF normalization
# automatically normalize line endings for all text-based files
# * text=auto
# the above will handle all files NOT found below
# or! to ensure files are always checked in with consistent line endings:
# * text eol=lf

# explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
# *.c text
# *.h text

# declare files that will always have CRLF line endings on checkout.
# *.sln text eol=crlf

# `binary` Git will understand that the files specified are not text
# and it should not try to change them.
# `binary` setting is also an alias for `-text -diff`

# force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work
# *.sh text eol=lf

#* !filter !diff
#*.gpg binary

# never modify any line ending in any file
# disregarding all nonsense from eol,autocrlf,renormalize,safecrlf,usecrlfattr,allBinary
# * -text

# git-crypt
# /.ssh/config filter=git-crypt-home diff=git-crypt-home
# /.ssh/config filter=git-crypt diff=git-crypt
# **/*.enc.* filter=git-crypt diff=git-crypt
# **/*.enc/** filter=git-crypt diff=git-crypt

# auto detect text files and perform LF normalization
# * text=auto
# the above will handle all files NOT found below
# need mergiraf in gitconfig
# * merge=mergiraf

# c/c++
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
*.cpp diff=cpp
*.hpp diff=cpp
*.cc diff=cpp
*.hh diff=cpp
*.cs diff=csharp
*.css diff=css
*.m diff=objc

*.html diff=html
*.xhtml diff=html
# *.go diff=golang
# *.el diff=lisp
# *.lsp diff=lisp
# *.lisp diff=lisp
# *.php diff=php
*.pl diff=perl
*.pm diff=perl
# *.pl text eof=lf diff=perl
# *.pm text eol=lf diff=perl
# *.py text eol=lf diff=python
*.py diff=python
*.rb diff=ruby
*.rs diff=rust

# *.doc diff=doc
# *.docx diff=docx
# *.doc diff=lesspipe
# *.docx diff=lesspipe
# *.odt diff=lesspipe
# *.ppt diff=lesspipe
# *.pptx diff=lesspipe
# *.xls diff=lesspipe
# *.xlsx diff=lesspipe
*.pptx binary

# documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text eol=crlf
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain
# *.epub diff=pandoc
# *.md diff=ruby
# *.org diff=org

# graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.svg text
*.eps binary

# scripts
*.bash text eol=lf
*.fish text eol=lf
# *.sh text eol=lf
*.zsh text eol=lf

# batch files
# explicitly windows files must be run with crlf line endings.
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# text files
# where line endings should be preserved.
*.patch -text

# denote all files that are truly binary and should not be modified.
*.sh -text
*.plist binary
*.webp binary

# exclude files from exporting
# README export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
.info export-ignore
