about summary refs log tree commit diff
path: root/Functions/VCS_Info/Backends
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2013-11-29 12:32:36 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2013-11-29 12:32:36 -0800
commit9972fdeead12204192cd40e4331ff8f89434df04 (patch)
tree07e08420bcec63f06a06e226453df11b950d68a9 /Functions/VCS_Info/Backends
parent561811602059a9b948be636710b45662174d1a6a (diff)
downloadzsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.gz
zsh-9972fdeead12204192cd40e4331ff8f89434df04.tar.xz
zsh-9972fdeead12204192cd40e4331ff8f89434df04.zip
32066: fix %r and %S in vcs_info formats when a repository subdirectory is accessed via a symlink
31985 Clemens Hammacher and 32064 Hong Xu
Diffstat (limited to 'Functions/VCS_Info/Backends')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git2
1 files changed, 1 insertions, 1 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}