diff options
author | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-12-05 16:30:17 -0600 |
---|---|---|
committer | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-12-08 15:26:26 -0400 |
commit | c30002208d392177cb1ffc1a5c714f7ad6d573b6 (patch) | |
tree | 9b17f82b31031521a98c5de683cc5b51c096ceaa /.gitattributes | |
parent | 030abbf48fd1399a30ed668f02e4ab02dbff0706 (diff) | |
download | vyos-1x-c30002208d392177cb1ffc1a5c714f7ad6d573b6.tar.gz vyos-1x-c30002208d392177cb1ffc1a5c714f7ad6d573b6.zip |
git: T5803: Adjust git configuration for baseline defaults
Apply baseline defaults for `.gitattributes` and `.vscode/settings.json`
for improved developer experience.
The `.gitattrbutes` settings are based on:
Git documentation (https://git-scm.com/docs/gitattributes#_effects)
GitHub documentation (https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings)
Community templates (https://github.com/gitattributes/gitattributes)
Since editor-agnostic line-ending specific settings are applied to
`.gitattributes`, they can be removed from `.vscode/settings.json`.
The global VSCode defaults have also been removed to avoid duplication.
Diffstat (limited to '.gitattributes')
-rw-r--r-- | .gitattributes | 84 |
1 files changed, 80 insertions, 4 deletions
diff --git a/.gitattributes b/.gitattributes index ea2cc59e4..624e00f03 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,80 @@ -data/templates/**/*.conf linguist-language=Jinja -*.tmpl linguist-language=Jinja -*.xml.i linguist-language=XML -*.xml.in linguist-language=XML +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.md text diff=markdown +*.mdx text diff=markdown +*.adoc text +*.csv text eol=crlf +*.rst text +*.txt text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary + +# Scripts +*.bash text eol=lf diff=bash +*.sh text eol=lf diff=bash + +# Serialisation +*.conf text +*.graphql text +*.j2 text +*.json text +*.rules text +*.service text +*.toml text +*.tmpl text linguist-language=Jinja +*.xml text +*.xml.i text linguist-language=XML +*.xml.in text linguist-language=XML +*.yaml text +*.yml text + +# Text files where line endings should be preserved +*.patch -text +*.diff -text + +# Python files +*.pxd text diff=python +*.py text diff=python +*.py3 text diff=python +*.pyw text diff=python +*.pyx text diff=python +*.pyz text diff=python +*.pyi text diff=python + +# Fix syntax highlighting on GitHub to allow comments +.vscode/*.json linguist-language=JSON-with-Comments + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore +*.pyc binary export-ignore +*.pyo binary export-ignore + +# +# Enable syntax highlighting for VSCode settings +# +.vscode/settings.json linguist-language=jsonc |