You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
print_preserved_template_diff emits 'not a git repository' noise when scaffolding a worktree via bare podman #1197
Found during the vault deploy (exo-pet/vault#31). When init-workspace.sh runs via bare podman run -v <worktree>:/workspace and <worktree> is a git worktree (not a primary checkout), print_preserved_template_diff printed fatal: not a git repository: (null) once per preserved file, and the template-divergence diffs for preserved files were silently suppressed.
Root cause
A worktree's .git is a file (gitdir: /path/outside/the/mount) pointing at the main repo's .git/worktrees/<name>, which is outside the bind mount. Inside the container, git can't resolve it, so git diff --no-index (or whatever print_preserved_template_diff uses to show preserved-file divergence) fails to init a repo. The failure is swallowed (|| true) so the scaffold completes correctly, but the operator loses the preserved-file diff output.
Fix options
Detect the worktree/non-resolvable-git case and either (a) run the preserved-file diff with git --no-index in a way that doesn't require a repo (it shouldn't — git diff --no-index a b works outside a repo, so the failure may be an env/GIT_DIR leak worth investigating), or (b) fall back to a plain diff when git is unavailable, or (c) suppress the per-file fatal: line and print one clear 'diffs unavailable (worktree not resolvable in container)' notice.
Impact
Low — non-fatal, scaffold output is correct; only the preserved-file divergence preview is lost and the log gains noise. Affects worktree-based bare-podman scaffolds (how the rollout agents run).
Fixed on release/1.4.0 via merge 480b0cc (PR #1202) (TDD: failing test + fix). Auto-close didn't fire because the PR targeted the release branch, not the default branch. Ships in 1.4.0.
Activity
test: reproduce preserved-diff failure in a foreign-git worktree
fix(workspace): make preserved-template diff robust to foreign-git wo…
fix(workspace): make preserved-template diff robust to foreign-git wo…
c-vigo commentedon Jul 17, 2026
Fixed on
release/1.4.0via merge 480b0cc (PR #1202) (TDD: failing test + fix). Auto-close didn't fire because the PR targeted the release branch, not the default branch. Ships in 1.4.0.fix(worktree): tolerate a foreign-git cwd in the _wt_repo backtick (#…
fix(install): dereference symlinked templates in preserved-file diffs (…