-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
area-infrastructureBuild, CI/CD, configurationBuild, CI/CD, configurationenhancementNew feature or requestNew feature or requestpriority:P2Normal: Standard enhancement or bug fix, moderate impactNormal: Standard enhancement or bug fix, moderate impact
Milestone
Description
Summary
Align .gitattributes with canonical patterns from gitattributes/gitattributes to improve cross-platform compatibility, diff rendering, and binary file handling.
Current State
The repository has a solid foundation:
- Global LF normalization (
* text=auto eol=lf) to fix YAML frontmatter parsing issues - Custom merge strategies for HANDOFF.md and handoffs
- Markdown diff rendering (
*.md diff=markdown)
Gap Analysis
Missing from Common.gitattributes
| Category | Pattern | Benefit |
|---|---|---|
| Documents | *.mdx text diff=markdown |
MDX support |
| Documents | *.txt text |
Explicit text handling |
| Graphics | *.png binary |
Prevent corruption |
| Graphics | *.jpg binary, *.jpeg binary |
Prevent corruption |
| Graphics | *.gif binary, *.ico binary |
Prevent corruption |
| Graphics | *.svg text |
Treat as diffable text |
| Scripts | *.sh text eol=lf |
Unix scripts (bootstrap-vm.sh exists) |
| Serialization | *.json text |
Explicit text handling |
| Serialization | *.yaml text, *.yml text |
Explicit text handling |
| Serialization | *.toml text, *.xml text |
Explicit text handling |
| Archives | *.zip binary, *.gz binary, etc. |
Prevent corruption |
| Patches | *.patch -text |
Preserve line endings |
| Export | .gitattributes export-ignore |
Exclude from archives |
| Export | .gitignore export-ignore |
Exclude from archives |
Missing from PowerShell.gitattributes
| Pattern | Note |
|---|---|
*.psm1 text |
Module files |
*.psd1 text |
Data files |
*.ps1xml text |
Format files |
*.pssc text |
Session config |
*.psrc text |
Role capability |
*.cdxml text |
CDXML files |
Note: Template uses
eol=crlfbut our globaleol=lfis intentional per Copilot CLI issue #694/#673. PowerShell 7+ handles LF fine cross-platform.
Missing from Python.gitattributes
| Pattern | Benefit |
|---|---|
*.py text diff=python |
Python-aware diffs |
*.pyw text diff=python |
Python scripts |
*.pyi text diff=python |
Type stubs |
*.ipynb text eol=lf |
Jupyter notebooks |
*.pyc binary export-ignore |
Compiled bytecode |
*.pyo binary export-ignore |
Optimized bytecode |
*.pyd binary |
Python DLLs |
*.pickle binary |
Serialized data |
Missing from Markdown.gitattributes
| Pattern | Benefit |
|---|---|
*.md linguist-detectable |
GitHub language stats |
Missing from VS Code / DevContainer
| Pattern | Benefit |
|---|---|
.vscode/*.json linguist-language=JSON-with-Comments |
Proper syntax highlighting on GitHub |
.devcontainer.json linguist-language=JSON-with-Comments |
JSONC support |
Proposed Structure
Reorganize into logical sections following the canonical template structure:
- Line Ending Normalization (existing)
- Documents (markdown, text files)
- Graphics (binary images)
- Scripts (shell, PowerShell)
- Serialization (JSON, YAML, TOML, XML)
- Python (source and binaries)
- Archives (compressed files)
- Patches (preserve line endings)
- GitHub/Linguist (language detection, syntax highlighting)
- Export (archive exclusions)
- Custom Merge Strategies (existing HANDOFF.md, handoffs)
Acceptance Criteria
- Add explicit
textattribute to markdown files:*.md text diff=markdown - Add binary declarations for common image formats
- Add PowerShell file type declarations (*.psm1, *.psd1, etc.)
- Add Python file type declarations with diff=python
- Add shell script declarations (*.sh, *.bash, etc.)
- Add serialization format declarations (JSON, YAML, TOML, XML)
- Add archive binary declarations
- Add patch file handling (
*.patch -text) - Add linguist attributes for GitHub rendering
- Add export-ignore for git metadata files
- Preserve existing custom merge strategies
- Maintain LF-first decision (override template CRLF recommendations)
References
- gitattributes/gitattributes - Canonical templates
- Common.gitattributes
- PowerShell.gitattributes
- Python.gitattributes
- Markdown.gitattributes
- Copilot CLI issues feat(validator): add investigation-only session QA skip validation #694, feat(skills): Standardize skill output format across all skills #673 (YAML parsing with CRLF)
Reactions are currently unavailable
Metadata
Metadata
Labels
area-infrastructureBuild, CI/CD, configurationBuild, CI/CD, configurationenhancementNew feature or requestNew feature or requestpriority:P2Normal: Standard enhancement or bug fix, moderate impactNormal: Standard enhancement or bug fix, moderate impact