From 08aec09651a09666f70e20746f3942559e17d69b Mon Sep 17 00:00:00 2001 From: FrozenlemonTee Date: Thu, 5 Mar 2026 22:59:05 +0800 Subject: [PATCH 1/3] feat: Add .gitattributes --- .gitattributes | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f18eafa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,65 @@ +# ----------------------------------------------------------------------------- +# mcpp-community Git attributes +# +# This configuration is part of the mcpp-community style specification. +# Repository: +# https://github.com/mcpp-community/mcpp-style-ref +# +# This file ensures consistent line endings and Git behavior across platforms. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# Default text handling +# ----------------------------------------------------------------------------- +* text=auto eol=lf # Normalize text files and enforce LF line endings + +# ----------------------------------------------------------------------------- +# Source code +# ----------------------------------------------------------------------------- +*.c text # C source files +*.cc text # C++ source files +*.cpp text # C++ source files +*.cxx text # C++ source files +*.h text # C headers +*.hpp text # C++ headers +*.hxx text # C++ headers +*.cppm text # C++ module interface units +*.ixx text # C++ module interface units (MSVC style) +*.mpp text # C++ module interface units + +# ----------------------------------------------------------------------------- +# Build system +# ----------------------------------------------------------------------------- +*.cmake text # CMake scripts +CMakeLists.txt text # CMake entry file +Makefile text # Makefile + +# ----------------------------------------------------------------------------- +# Documentation +# ----------------------------------------------------------------------------- +*.md text # Markdown files +*.txt text # Plain text documentation + +# ----------------------------------------------------------------------------- +# Structured data +# ----------------------------------------------------------------------------- +*.json text # JSON configuration files +*.yml text # YAML configuration files +*.yaml text # YAML configuration files + +# ----------------------------------------------------------------------------- +# Scripts +# ----------------------------------------------------------------------------- +*.sh text eol=lf # Shell scripts must use LF + +# ----------------------------------------------------------------------------- +# Binary files +# ----------------------------------------------------------------------------- +*.png binary # PNG images +*.jpg binary # JPEG images +*.jpeg binary # JPEG images +*.gif binary # GIF images +*.pdf binary # PDF files +*.zip binary # ZIP archives +*.tar binary # TAR archives +*.gz binary # Gzip archives \ No newline at end of file From 7967c3d3a839d81510eb884563030db7be999077 Mon Sep 17 00:00:00 2001 From: FrozenlemonTee Date: Thu, 5 Mar 2026 23:08:11 +0800 Subject: [PATCH 2/3] style: Format .gitattributes --- .gitattributes | 98 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/.gitattributes b/.gitattributes index f18eafa..a5737a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,50 +16,94 @@ # ----------------------------------------------------------------------------- # Source code # ----------------------------------------------------------------------------- -*.c text # C source files -*.cc text # C++ source files -*.cpp text # C++ source files -*.cxx text # C++ source files -*.h text # C headers -*.hpp text # C++ headers -*.hxx text # C++ headers -*.cppm text # C++ module interface units -*.ixx text # C++ module interface units (MSVC style) -*.mpp text # C++ module interface units + +# C source files +*.c text + +# C++ source files +*.cc text +*.cpp text +*.cxx text + +# C headers +*.h text + +# C++ headers +*.hpp text +*.hxx text + +# C++ module interface units +*.cppm text +*.ixx text +*.mpp text # ----------------------------------------------------------------------------- # Build system # ----------------------------------------------------------------------------- -*.cmake text # CMake scripts -CMakeLists.txt text # CMake entry file -Makefile text # Makefile + +# CMake scripts +*.cmake text + +# CMake entry file +CMakeLists.txt text + +# Makefile +Makefile text # ----------------------------------------------------------------------------- # Documentation # ----------------------------------------------------------------------------- -*.md text # Markdown files -*.txt text # Plain text documentation + +# Markdown files +*.md text + +# Plain text documentation +*.txt text # ----------------------------------------------------------------------------- # Structured data # ----------------------------------------------------------------------------- -*.json text # JSON configuration files -*.yml text # YAML configuration files -*.yaml text # YAML configuration files + +# JSON configuration files +*.json text + +# YAML configuration files +*.yml text + +# YAML configuration files +*.yaml text # ----------------------------------------------------------------------------- # Scripts # ----------------------------------------------------------------------------- -*.sh text eol=lf # Shell scripts must use LF + +# Shell scripts must use LF +*.sh text eol=lf # ----------------------------------------------------------------------------- # Binary files # ----------------------------------------------------------------------------- -*.png binary # PNG images -*.jpg binary # JPEG images -*.jpeg binary # JPEG images -*.gif binary # GIF images -*.pdf binary # PDF files -*.zip binary # ZIP archives -*.tar binary # TAR archives -*.gz binary # Gzip archives \ No newline at end of file + +# PNG images +*.png binary + +# JPEG images +*.jpg binary + +# JPEG images +*.jpeg binary + +# GIF images +*.gif binary + +# PDF files +*.pdf binary + +# ZIP archives +*.zip binary + +# TAR archives +*.tar binary + +# Gzip archives +*.gz binary \ No newline at end of file From fdd4af64b7af767dc743fe43f39a84075bd08ce9 Mon Sep 17 00:00:00 2001 From: FrozenlemonTee Date: Thu, 5 Mar 2026 23:08:33 +0800 Subject: [PATCH 3/3] style: Format .gitattributes --- .gitattributes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index a5737a5..fe77101 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,7 +11,9 @@ # ----------------------------------------------------------------------------- # Default text handling # ----------------------------------------------------------------------------- -* text=auto eol=lf # Normalize text files and enforce LF line endings + +# Normalize text files and enforce LF line endings +* text=auto eol=lf # ----------------------------------------------------------------------------- # Source code