Skip to content

Draft: libmakepkg: fix compatibility with git bareRepository=explicit

Git 2.38 introduced a safe.bareRepository = explicit configuration option (more background) (disabled by default) to improve security, which allows working with bare repos only if they are explicitly specified via --git-dir or GIT_DIR.

Since makepkg downloads git repos using --mirror, which implies --bare, operations on downloaded (but not extracted) repos will fail with this option.

Add --git-dir on operations over downloaded repos, to tell git that we trust the path is the root of a git repo, and thus allows it to work with a bare repo.

Edited by Joan Bruguera Micó

Merge request reports