From 3ddbb44cc1970df3c28c59ae3ee684da9ef6b396 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Feb 2013 17:44:48 +0100 Subject: [PATCH] use subshell and not push/popd --- antigen.zsh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index f08bf45..c3bd32e 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -209,19 +209,10 @@ antigen-revert () { # Save current revision. local old_rev="$(--plugin-git rev-parse HEAD)" # Pull changes if update requested. - --plugin-git pull - # If pull failed then try to pull directly from the clone directory - # In older version (1.8) of git the previous command seems not to work - if [ $? -ne 0 ]; then - pushd > /dev/null - git pull - popd > /dev/null - fi + (cd "$clone_dir" && git pull --no-pager) + #--plugin-git pull # Update submodules. - pushd > /dev/null - cd "$clone_dir" - git submodule update --recursive - popd > /dev/null + (cd "$clone_dir" && git submodule update --recursive) # Get the new revision. local new_rev="$(--plugin-git rev-parse HEAD)" fi -- 2.0.0