From 123b31b161f1d7fe803099201bac190e22cca6a7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Bocharov Date: Tue, 28 Feb 2023 10:53:33 +0300 Subject: [PATCH] Replace absolute path to git-tree with relative, so it is accesible without docker builder. --- lib/functions/general/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/general/git.sh b/lib/functions/general/git.sh index ebcabdbd2a..9cfa07f57e 100644 --- a/lib/functions/general/git.sh +++ b/lib/functions/general/git.sh @@ -127,7 +127,7 @@ function fetch_from_repo() { display_alert "Original gitdir: " "$(cat "${git_work_dir}/.git")" "git" local git_work_dir_basename git_work_dir_basename="$(basename "${git_work_dir}")" - echo "gitdir: ${GIT_BARE_REPO_FOR_WORKTREE}/.git/worktrees/${git_work_dir_basename}" > "${git_work_dir}/.git" + echo "gitdir: $(realpath --relative-to=${git_work_dir} ${GIT_BARE_REPO_FOR_WORKTREE}/.git/worktrees/${git_work_dir_basename})" > "${git_work_dir}/.git" display_alert "Modified gitdir: " "$(cat "${git_work_dir}/.git")" "git" # Fix the bare repo's reference to the working tree; this avoids errors when the working tree is moved.