Skip to content

input: handle worktrees/submodules when discovering the root - #2390

Merged
woodruffw merged 2 commits into
mainfrom
ww/submod
Sep 15, 2026
Merged

woodruffw merged 2 commits into
mainfrom
ww/submod

Conversation

@woodruffw

Copy link
Copy Markdown
Member

TL;DR: we no longer check if .git is a directory. Instead, if it's a file, we consider that "good enough" as a root signal, which that also catches worktrees and submodules (both of which use a regular file named .git whose contents are a path to the actual Git contents).

I'm moderately confident this is what we want; intuitively a user who runs zizmor ./repo/submodule probably expects their configuration to be resolved relative to the submodule rather than relative to the parent repo.

Fixes #2381.

@woodruffw woodruffw self-assigned this Sep 15, 2026
@woodruffw woodruffw added bugfix Fixes a known bug config Configuration functionality labels Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a known bug config Configuration functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: zizmor discovers the wrong zizmor.yml when run inside a git submodule

1 participant