Skip to content

wip init's HEAD-tracked-path check can't tell a sparse/skip-worktree entry from a real file #69

Closed

Description

@brettheap

wip init step 7's outer presence test (PR #44 round 3) now includes git cat-file -e "HEAD:$rel", so any path HEAD carries reaches the "leave it exactly as the person left it" branch and continues without checking the worktree at all — which is the tool's own long-standing principle ("A TEMPLATE PATH HEAD ALREADY CARRIES IS THE PERSON'S, whatever it says now: this command has never modified a committed file") applied to a case it did not previously reach.

A path with the git skip-worktree bit set (or excluded by a git sparse-checkout configuration) answers this exactly the same way a person's own deliberate absence does: HEAD and the stage-0 index entry both carry it, git status reports it clean (skip-worktree tells git not to compare the worktree at all), and the worktree file is nonetheless physically absent. Step 7 continues past it, seeded and owed never count it, and step 9 writes the pointer file as though the workspace were fully set up — while a template path this command (or the lane tooling that reads what it seeds) may need on disk is not there.

Why this is being filed rather than fixed here

This is a narrower and more exotic precondition than everything else round 3 has closed: wip init's target is a small, purpose-built lane-data repository (nine template files), not the kind of large monorepo git sparse-checkout and skip-worktree exist for, and no test in this suite (nor, as far as this round has found, any real workflow this command is used in) constructs one. Distinguishing a skip-worktree/sparse entry from an ordinary tracked one needs git ls-files -v -- "$rel" (a lowercase letter in the first column marks skip-worktree) or reading .git/info/sparse-checkout, either of which is a real addition to a branch that has already taken six real findings and filed three issues (#62, #63, #64) this round.

Reported via review thread #44 (comment) (originally openRepoTools:1616; now resolved on the PR, naming this issue).

Activity

  1. brettheap commented on Sep 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T22:50:58Z, for #69

    Logged in lanes/log/openRepoTools-3.md at aa2c57ad57e8d7f8c3e08a19bec85e0130920bc4.

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

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

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T00:36:20Z, for #69

  3. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-1, session df82f553-7803-49c4-8ddf-3f9acdcb8ee0@Eagle, 2026-09-16T01:06:43Z, for #69

    Logged in lanes/log/openRepoTools-1.md at e65a2bc7f633eff545c58f1512715325faba8b9b.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#69:
    6:CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T22:50:58Z, for opensoft/openRepoTools#69
    13:1. existing `CLAIMED —` comments on opensoft/openRepoTools#69:
    26:RELEASED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T00:36:20Z, for opensoft/openRepoTools#69
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#69"`, kept where the row or its body names `#69`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `69` as a whole token:
       none
    
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions