git-barepo

Tools for sharing git bare repositories
git clone git://git.meso-star.fr/git-repo.git
Log | Files | Refs | README | LICENSE

commit 8a1cd66fec9ee4461e86317a66fc138426d3f067
parent 25948207bbef9760e0ef598eec0dbad93e28d517
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 19 Jan 2026 20:42:43 +0100

git-repo: fix how git repository is retrieved

The script used the --path-format=absolute option of the git-rev-parse
command, which is recent and therefore cannot be assumed to be
available. The option has therefore been removed and replaced with shell
code that achieves the same result, namely retrieving the absolute path
to a repository's git directory.

Diffstat:
Mgit-repo | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/git-repo b/git-repo @@ -195,13 +195,14 @@ else cd -- "${repo}" - # Retrieve the "git" directory, i.e., the directory where git data is - # stored - if ! git_dir=$(git rev-parse --path-format=absolute --git-dir 2>&1) + # Retrieve the absolute path to the "git" directory, i.e., the + # directory where git data is stored + if ! git_dir=$(git rev-parse --git-dir 2>&1) then >&2 printf '%s: %s\n' "${repo}" "${git_dir}" die fi + git_dir="$(cd "${git_dir}" && pwd)" # Check that the repository is a bare repository if ! git_bare=$(git rev-parse --is-bare-repository) \