From 05aa1756d505b6223eef8eead6c875f353597846 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Mon, 28 Oct 2024 17:50:07 +0100 Subject: [PATCH] fix: restore compatibility with Git prior to v2.31 (#1838) --- copier/tools.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/copier/tools.py b/copier/tools.py index 983e712bb..d2f5f064e 100644 --- a/copier/tools.py +++ b/copier/tools.py @@ -230,16 +230,15 @@ def get_git_objects_dir(path: Path) -> Path: from .vcs import get_git git = get_git() - return Path( + return path.joinpath( git( "-C", path, "rev-parse", - "--path-format=absolute", "--git-path", "objects", ).strip() - ) + ).absolute() def set_git_alternates(*repos: Path, path: Path = Path(".")) -> None: