Permalink
Browse files

use subshell and not push/popd

  • Loading branch information...
1 parent fae7cac commit 3ddbb44cc1970df3c28c59ae3ee684da9ef6b396 @xgarrido xgarrido committed Feb 15, 2013
Showing with 3 additions and 12 deletions.
  1. +3 −12 antigen.zsh
View
@@ -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

0 comments on commit 3ddbb44

Please sign in to comment.