mirror of
https://github.com/mangostwo/server
synced 2026-08-20 02:23:09 -04:00
Define source file line-ending attributes (#357)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
021084eda0
commit
ee903d63a7
1 changed files with 83 additions and 7 deletions
90
.gitattributes
vendored
90
.gitattributes
vendored
|
|
@ -1,12 +1,88 @@
|
|||
# Lineendings
|
||||
*.sln eol=crlf
|
||||
*.vcproj eol=crlf
|
||||
*.vcxproj* eol=crlf
|
||||
# ============================================================================
|
||||
# Line-ending and whitespace attributes
|
||||
#
|
||||
# Goal: keep source/text files normalized so that replacing a file with a
|
||||
# copy that only differs in CRLF/LF does NOT show up as a whole-file diff.
|
||||
# This defines behaviour going forward only; no mass renormalization is done.
|
||||
# ============================================================================
|
||||
|
||||
src/shared/revision_nr.h eol=lf
|
||||
src/shared/revision_sql.h eol=lf
|
||||
# Let Git handle text detection and normalize text to LF in the repository.
|
||||
* text=auto
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# C/C++ source -> stored and checked out as LF
|
||||
# ----------------------------------------------------------------------------
|
||||
*.c text eol=lf
|
||||
*.cc text eol=lf
|
||||
*.cpp text eol=lf
|
||||
*.cxx text eol=lf
|
||||
*.h text eol=lf
|
||||
*.hpp text eol=lf
|
||||
*.hxx text eol=lf
|
||||
*.inl text eol=lf
|
||||
|
||||
# Generated revision headers must stay LF
|
||||
src/shared/revision_nr.h text eol=lf
|
||||
src/shared/revision_sql.h text eol=lf
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# CMake, config and other text files -> LF
|
||||
# ----------------------------------------------------------------------------
|
||||
CMakeLists.txt text eol=lf
|
||||
*.cmake text eol=lf
|
||||
*.sql text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.md text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.dist text eol=lf
|
||||
*.json text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Unix shell scripts -> LF
|
||||
# ----------------------------------------------------------------------------
|
||||
*.sh text eol=lf
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Windows scripts and Visual Studio project files -> CRLF
|
||||
# ----------------------------------------------------------------------------
|
||||
*.sln text eol=crlf
|
||||
*.vcproj text eol=crlf
|
||||
*.vcxproj* text eol=crlf
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Binary / runtime artifacts -> never normalize
|
||||
# ----------------------------------------------------------------------------
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.bmp binary
|
||||
*.mpq binary
|
||||
*.dbc binary
|
||||
*.db2 binary
|
||||
*.map binary
|
||||
*.vmap binary
|
||||
*.mmap binary
|
||||
*.lib binary
|
||||
*.dll binary
|
||||
*.exe binary
|
||||
*.pdb binary
|
||||
*.zip binary
|
||||
*.7z binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
|
||||
# ============================================================================
|
||||
# Whitespace rules (preserved from the original .gitattributes)
|
||||
# ============================================================================
|
||||
|
||||
# Whitespace rules
|
||||
# strict (no trailing, no tabs)
|
||||
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
|
||||
*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue