mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2026-11-07 00:29:49 +05:00
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