From 0046a4660cc0af60e7ddea3bee3e9febece72ec5 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Sep 27 2022 08:21:45 +0000 Subject: Merge remote-tracking branch 'origin/users/syu/scripts/for-next' into scripts --- diff --git a/scripts/wd-functions.sh b/scripts/wd-functions.sh index 3111d40..d645a42 100644 --- a/scripts/wd-functions.sh +++ b/scripts/wd-functions.sh @@ -34,7 +34,7 @@ get_branch_name() if $using_git; then # FIXME: guess a branch name when a non-branch revision is checked # out - local res=$(sed -ne 's|^ref: refs/heads/||p' "$scripts_dir"/../.git/HEAD 2>/dev/null) + local res=$(sed -ne 's|^ref: refs/heads/||p' "$(git rev-parse --git-dir)"/HEAD 2>/dev/null) echo "$res" fi }