commit 475178c2dd4d771f1556f5277627f1740e872648
parent d767460e9a1fda2eadcf9639e567221af714df23
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 1 Dec 2025 16:25:17 +0100
git-repo: fixed relative path handling
Errors occurred when the repository path was relative rather than
absolute, such as "directory not found".
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-repo b/git-repo
@@ -197,10 +197,11 @@ if ! git_bare=$(git rev-parse --is-bare-repository) \
die
fi
+cd -- "${OLDPWD}"
+
# Retrieve absolute path of the git directory
cd -- "${git_dir}"
git_dir="$(pwd)"
-
cd -- "${OLDPWD}"
if [ -n "${group}" ]; then