Created
January 19, 2012 14:24
-
-
Save kyanagi/1640254 to your computer and use it in GitHub Desktop.
optimize vcs_info on Cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/share/zsh/4.3.12/functions/VCS_INFO_bydir_detect 2011-08-08 04:59:41.001000000 +0900 | |
+++ VCS_INFO_bydir_detect 2012-01-19 21:52:35.293434600 +0900 | |
@@ -6,7 +6,7 @@ | |
local dirname=$1 | |
local basedir="." realbasedir file | |
-realbasedir="$(VCS_INFO_realpath ${basedir})" | |
+realbasedir="${basedir:A}" | |
while [[ ${realbasedir} != '/' ]]; do | |
[[ -r ${realbasedir} ]] || return 1 | |
if [[ -n ${vcs_comm[detect_need_file]} ]] ; then | |
@@ -20,7 +20,7 @@ | |
fi | |
basedir=${basedir}/.. | |
- realbasedir="$(VCS_INFO_realpath ${basedir})" | |
+ realbasedir="${basedir:A}" | |
done | |
[[ ${realbasedir} == "/" ]] && return 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment