--- id: "bug-1618" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "build" severity: "unknown" timestamp: "2026-08-21T00:00:00Z" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/tools/test-dirty-fingerprint-nix-production-path.sh"] tags: ["git", "pathspec", "worktree", "dirty-content-fingerprint", "task-6.3", "src/tools"] related: [] legacy: true --- # bug-1618: error: pathspec 'flake.nix' did not match any file(s) known to git ## Description error: pathspec 'flake.nix' did not match any file(s) known to git ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause `git -C "$ISO_DIR" checkout -- "$EDIT_FILE_REL"` used the isolated worktree's ROOT ($ISO_DIR) as the -C directory while EDIT_FILE_REL was just "flake.nix" (unqualified), but the edited file actually lives at $ISO_DIR/src/flake.nix -- git resolves pathspecs relative to the -C directory, so "flake.nix" alone did not match anything from the worktree root. Unlike the sibling task 6.1/6.2 scripts (which edit README.md directly at the worktree ROOT, where this exact pattern is correct), this script's edit target is one level deeper inside src/, which the copied pattern did not account for. ## Fix Changed both `git -C "$ISO_DIR" checkout -- "$EDIT_FILE_REL"` call sites to `git -C "$ISO_SRC" checkout -- "$EDIT_FILE_REL"` (ISO_SRC = $ISO_DIR/src), so the pathspec correctly resolves relative to the flake's own source directory where flake.nix actually lives. ## Verification _Not recorded (migrated from buglog.json)._ ## References _Not recorded (migrated from buglog.json)._