summaryrefslogtreecommitdiff
path: root/Functions/VCS_Info
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2013-12-02 15:39:20 +0100
committerAxel Beckert <abe@deuxchevaux.org>2013-12-02 15:39:20 +0100
commit8f07e7658dcdfecc082ddaaad8e26f460eb02d45 (patch)
treea16ecc9a433b450827fbd056b06a3260592a8a37 /Functions/VCS_Info
parentdf234cd62d04180a54071c7a2a5210d1f16c8b98 (diff)
parent56aa469d06a60ff23fe0c50ab9d44ae40c150412 (diff)
downloadzsh-8f07e7658dcdfecc082ddaaad8e26f460eb02d45.tar.gz
zsh-8f07e7658dcdfecc082ddaaad8e26f460eb02d45.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git2
-rw-r--r--Functions/VCS_Info/VCS_INFO_reposub4
2 files changed, 3 insertions, 3 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index c44be398e..e6791cb7a 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -132,7 +132,7 @@ fi
VCS_INFO_adjust
VCS_INFO_git_getaction ${gitdir}
-gitbase=${PWD%/${$( ${vcs_comm[cmd]} rev-parse --show-prefix )%/##}}
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
rrn=${gitbase:t}
local patchdir=${gitdir}/patches/${gitbranch}
diff --git a/Functions/VCS_Info/VCS_INFO_reposub b/Functions/VCS_Info/VCS_INFO_reposub
index 0fab863f1..1c16f0e7b 100644
--- a/Functions/VCS_Info/VCS_INFO_reposub
+++ b/Functions/VCS_Info/VCS_INFO_reposub
@@ -5,9 +5,9 @@
setopt localoptions extendedglob NO_shwordsplit
local base=${1%%/##}
-[[ ${PWD} == ${base}/* ]] || {
+[[ $(pwd -P) == ${base}/* ]] || {
printf '.'
return 1
}
-printf '%s' ${PWD#$base/}
+printf '%s' ${$(pwd -P)#$base/}
return 0