Skip to content

Add .gitattributes to enforce LF line endings for consistent reviewmark fingerprints#62

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/create-gitattributes-file
Mar 24, 2026
Merged

Add .gitattributes to enforce LF line endings for consistent reviewmark fingerprints#62
Malcolmnixon merged 2 commits intomainfrom
copilot/create-gitattributes-file

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

Pull Request

Description

The reviewmark tool computes SHA256 fingerprints to detect file modifications, but git's platform-dependent line-ending normalization causes fingerprint mismatches across Windows and Unix environments. Adding .gitattributes enforces consistent LF checkout for all text files, with CRLF preserved for Windows batch files that require it.

Changes:

  • .gitattributes — new file at repo root:
    • * text=auto eol=lf — normalizes all text files to LF on checkout, ensuring stable SHA256 fingerprints regardless of developer OS
    • *.bat / *.cmd — explicitly set to eol=crlf since Windows batch files require CRLF to execute correctly

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All unit tests pass: dotnet test --configuration Release
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • All linters pass: ./lint.sh (Unix/macOS) or cmd /c lint.bat / ./lint.bat (Windows)

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

Note: developers on Windows may need to re-checkout affected files after this change is merged to have git re-normalize line endings (git add --renormalize .).


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Add .gitattributes file for line-ending management Add .gitattributes to enforce LF line endings for consistent reviewmark fingerprints Mar 23, 2026
Copilot AI requested a review from Malcolmnixon March 23, 2026 23:50
@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 23, 2026 23:59
Copilot AI review requested due to automatic review settings March 23, 2026 23:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a repo-root .gitattributes to make line ending normalization deterministic across platforms, preventing reviewmark SHA256 fingerprint mismatches between Windows and Unix checkouts.

Changes:

  • Enforce LF line endings on checkout for all text files (* text=auto eol=lf).
  • Preserve CRLF for Windows batch scripts (*.bat, *.cmd) to maintain runtime compatibility on Windows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Malcolmnixon Malcolmnixon merged commit 2450ec1 into main Mar 24, 2026
10 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/create-gitattributes-file branch March 24, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants