Skip to content

adopt-project.py: a nested .gitattributes setting eol or -text for a pinned copy outranks #471's root LF block, so Windows writes CRLF #530

Closed

Description

@brettheap

A limit of #471's fix, which is in PR #511.

From the v1.1.0 triage of the v1.0.0 known limits on #457. One pull request covers the lines below.

Lines

Order: After PR #511 (#471) lands.

Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.

The lines as written on the tracking issues

A source with a NESTED .gitattributes (scripts/.gitattributes, .github/.gitattributes) that sets eol or -text for a pinned copy under it outranks the root block for that copy, and a Windows checkout can still write it CRLF; nothing in adopt reads nested attribute files (#471's fix).
— #457, comment

Activity

  1. added this to the v1.1.0 milestone on Oct 14, 2026
  2. added a commit that references this issue on Oct 14, 2026
  3. brettheap commented on Oct 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-14T22:34:22Z, for #530

    Logged in lanes/log/openRepoShape-1.md at f4c32479cdcc18989f71c108bd64a0d37bd45c85.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#530:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#530"`, kept where the row or its body names `#530`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `530` as a whole token:
       none
    
  4. brettheap commented on Oct 15, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoShape-2, 2026-10-15T17:20:21Z)

    To lane openRepoShape-1, which has claimed this issue: one more line for it, with two riders. From the checklist triage of 2026-10-15; Brett Heap approved its recommendations at 2026-10-15T16:49:38Z. Its D5(a) adds the CRLF .gitattributes line below to this issue rather than filing a new one, so one pull request and one review cover the limits of #471's block.

    Scope added: check finds, before any leg exists, a source .gitattributes blob that git add would re-encode; the block names each copy at the path git tracks.

    Line

    Rides along (backlog; tick it here if the same change covers it)

    Each line above is marked → #530 on #457. Tick it there too when this closes.

    The lines as written on #457

    A source .gitattributes committed with CRLF under a non-auto rule (* text eol=lf or * text eol=crlf, each line ended \r\n) is renormalised to LF whole when the split stages it (git add -A, adopt-project.py:7306). check exits 0, then execute exits 1 with FINDING adopt-lost: .gitattributes after both legs exist; the source and its main are untouched. A CRLF blob under * text=auto (or * text=auto eol=lf) adopts and verifies. Measured at 1ce4f45. Main 3121945 behaves the same, so this is not #511's.
    — #457, comment

    A pinned copy written through a root-kept symlinked DIRECTORY (.github -> ci) is named in #471's block by its link spelling, /.github/workflows/validate.yml text eol=lf (eol_line, scripts/shape_materialize.py:721). Git tracks ci/workflows/validate.yml, so that line governs nothing. #504 still accepts such a link (tests/test_adopt_root_symlinks.py:1203, :1205). Measured at 1ce4f45 with a source rule * text=auto eol=crlf: check and execute exit 0, the clone writes ci/workflows/validate.yml CRLF, and validate-pins.py exits 1 with shape-copy-drift: .github/workflows/validate.yml (a control without the link exits 0). Not a regression: main 3121945, with no block, reports nine shape-copy-drift findings for the same source. Where git has core.symlinks=false, execute refuses first (adopt-symlinks-off).
    — #457, comment

    The block settles line endings only. eol_line writes /<path> text eol=lf and nothing else (scripts/shape_materialize.py:721), and extend_eol_block reads no other word (:773). Git still applies a source's other rules to a pinned copy, so a source filter= or working-tree-encoding= rule reaches it. Measured at 1ce4f45 with *.py working-tree-encoding=UTF-16LE-BOM: execute exits 2 after both legs exist, at git add -A (fatal: failed to encode 'scripts/repo_shape.py' from UTF-16LE-BOM to UTF-8), and nothing is rolled back. ident changes a copy only if it holds $Id$, and none of the 11 pinned copies does.
    — #457, comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions