Files
Stefan Zweifel d0b01107b5 Accept repositories where .git is a file (#417)
The repository check used `[ -d ".git" ]`, which fails for git submodules,
linked worktrees and clones made with `--separate-git-dir`. In those cases
`.git` is a file that points to the actual git directory.

Use `-e` instead so both forms are accepted.

Also escape the backticks around `repository` in the error message. Unescaped,
bash ran `repository` as a command substitution and the input name was missing
from the message.

Add tests for submodules (absolute and relative path), `--separate-git-dir`,
linked worktrees, the error message and a non-existing repository directory.

Fixes #416
2026-10-22 08:46:58 +02:00
..