1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-04 06:14:50 +01:00

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
This commit is contained in:
Barton E. Schaefer 2013-11-29 12:32:36 -08:00
parent 5618116020
commit 9972fdeead
3 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2013-11-29 Barton E. Schaefer <schaefer@zsh.org>
* 32066 (via 31985 Clemens Hammacher and 32064 Hong Xu):
Functions/VCS_Info/Backends/VCS_INFO_get_data_git,
Functions/VCS_Info/VCS_INFO_reposub: fix %r and %S in vcs_info
formats when a repository subdirectory is accessed via a symlink.
2013-11-27 Barton E. Schaefer <schaefer@zsh.org>
* 32061: Src/utils.c: Fix "use of uninitialized memory" in metafy

View file

@ -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}

View file

@ -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