Skip to content

fix(compile): pin LF eol on managed gitattributes entries#340

Merged
jamesadevine merged 1 commit intomainfrom
copilot/update-default-line-endings
Apr 28, 2026
Merged

fix(compile): pin LF eol on managed gitattributes entries#340
jamesadevine merged 1 commit intomainfrom
copilot/update-default-line-endings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

On Windows (default core.autocrlf=true), every recompile produced warning: in the working copy of '<pipeline>.yml', LF will be replaced by CRLF the next time Git touches it, because the compiler writes LF but Git assumed CRLF was canonical for these files.

Summary

  • src/compile/gitattributes.rs: extend the per-file ATTRIBUTES constant from linguist-generated=true merge=ours to linguist-generated=true merge=ours text eol=lf, declaring LF as the canonical EOL for compiled pipelines.
  • Writer behavior is unchanged — files are still emitted as LF, so working-copy bytes stay stable across platforms and ado-aw check integrity holds.
  • No repo-level .gitattributes change: the managed block already enumerates every compiled pipeline.

Resulting line per pipeline:

agents/foo.lock.yml linguist-generated=true merge=ours text eol=lf

Test plan

  • Updated substring assertions in the four affected tests (writes_new_gitattributes_when_missing, preserves_user_managed_lines, replaces_existing_managed_block, quotes_paths_containing_spaces).
  • Added entries_pin_lf_eol regression test so the text eol=lf attribute can't be silently dropped.
  • cargo test and cargo clippy --all-targets --all-features both clean.

Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/5acd63b7-baaf-491a-932a-acee2d27b97f

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review April 28, 2026 14:11
@jamesadevine jamesadevine merged commit 8efb5fb into main Apr 28, 2026
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.

2 participants