gabyx / Githooks

🦎 Githooks: per-repo and shared Git hooks with version control and auto update. [✩Star] if you're using it!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git config --show-scope not supported on older versions of git.

Tingles opened this issue · comments

func NewConfigCache(gitx Context, filterFunc func(string) bool) (ConfigCache, error) {

the --show-scope option if used in this function implmentation should check the git version on the host.
Git 2.25 fails even when requesting help.

user@host: ~/.githooks/bin/runner --help
⛑  Could not init git config cache.
   -> errors:
   ✗  Command failed: 'git ["config" "--includes" "--list" "--null" "--show-scope"]' [cwd: '', env: [], err: 'error: unknown option `show-scope'
     usage: git config [<options>]

     Config file location
         --global              use global config file
         --system              use system config file

Thanks for the report.

I think we have a hard requirement for git >= 2.28.x
We need the --show-scope unfortunately.

Not sure if we can do it differently.