Skip to content

Get-AgentJobFingerprint - Store the file with LF line endings - #10783

Open
andreasjordan wants to merge 1 commit into
developmentfrom
fix-agentjobfingerprint-line-endings
Open

andreasjordan wants to merge 1 commit into
developmentfrom
fix-agentjobfingerprint-line-endings

Conversation

@andreasjordan

Copy link
Copy Markdown
Collaborator

Problem

private/functions/Get-AgentJobFingerprint.ps1 came in with #10767 and is stored in the repository with CRLF line endings. git ls-files --eol shows it as i/crlf ... attr/text. .gitattributes declares *.ps1 as text, so git normalizes the working file to LF before it compares it with the blob. The CRLF blob never matches, so the file shows as modified (117 lines changed, 117 removed) in every fresh clone and checkout:

Change

git add --renormalize private/functions/Get-AgentJobFingerprint.ps1, which stores the blob with LF like every other .ps1 file. The content is unchanged: git diff --ignore-cr-at-eol is empty. It was the only file with the text attribute stored with CRLF; git ls-files --eol now lists none.

Tests

No code changes, so no new tests. The commit carries (do Copy-DbaAgentJob), the only command that uses this helper.

馃 Generated with Claude Code

The file came in with CRLF line endings in the repository (#10767). .gitattributes
declares *.ps1 as text, so git compares the working file normalized to LF against
the CRLF blob, and the file shows as modified in every clone. git restore cannot
clear it, and it blocks switching to branches that do not have the file.

This renormalizes the blob to LF. The content is unchanged: the diff is empty with
--ignore-cr-at-eol. It was the only text file in the repository stored with CRLF.

(do Copy-DbaAgentJob)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andreasjordan
andreasjordan marked this pull request as ready for review October 11, 2026 14:30

@potatoqualitee potatoqualitee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at ca3a99a. No material defect found.

Verified the complete patch and raw Git blobs: the only change is normalization of 117 CRLF line endings to LF. The blobs are otherwise byte-for-byte identical, and the diff is empty with --ignore-cr-at-eol. This matches the existing *.ps1 text attribute. Fingerprint separators are explicit string escapes, so their values are unchanged.

Checked the Copy-DbaAgentJob call sites, existing behavioral coverage, and discussions. All 20 executed head checks passed, including the Azure COPY matrix; one Windows test check was skipped. No additional tests are needed for the verified content-preserving normalization. Pester was not rerun locally.

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