From 3c16e1f03b03b5b0362befb289094623ed17b414 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Thu, 21 Feb 2013 22:54:27 +0530 Subject: [PATCH] Avoid git cd-less magic. It appears that the whole git magic that's going on to avoid starting a subshell is causing problems on certain slightly old versions of git. Now switched to `cd`-ing to the clone to avoid any trouble in this regard. --- antigen.zsh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index 5d38d87..b32997f 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -199,8 +199,7 @@ antigen-revert () { # A temporary function wrapping the `git` command with repeated arguments. --plugin-git () { - eval git --no-pager \ - --git-dir=$clone_dir/.git --work-tree=$clone_dir "$@" + (cd "$clone_dir" && git --no-pager "$@") } # Clone if it doesn't already exist. @@ -210,10 +209,9 @@ antigen-revert () { # Save current revision. local old_rev="$(--plugin-git rev-parse HEAD)" # Pull changes if update requested. - (cd "$clone_dir" && git --no-pager pull) - #--plugin-git pull + --plugin-git pull # Update submodules. - (cd "$clone_dir" && git submodule update --recursive) + --plugin-git submodule update --recursive # Get the new revision. local new_rev="$(--plugin-git rev-parse HEAD)" fi -- 2.0.0