Commit 3ddbb44cc1970df3c28c59ae3ee684da9ef6b396

Authored by Xavier Garrido
1 parent fae7cac7ef

use subshell and not push/popd

Showing 1 changed file with 3 additions and 12 deletions Side-by-side Diff

... ... @@ -209,19 +209,10 @@ antigen-revert () {
209 209 # Save current revision.
210 210 local old_rev="$(--plugin-git rev-parse HEAD)"
211 211 # Pull changes if update requested.
212   - --plugin-git pull
213   - # If pull failed then try to pull directly from the clone directory
214   - # In older version (1.8) of git the previous command seems not to work
215   - if [ $? -ne 0 ]; then
216   - pushd > /dev/null
217   - git pull
218   - popd > /dev/null
219   - fi
  212 + (cd "$clone_dir" && git pull --no-pager)
  213 + #--plugin-git pull
220 214 # Update submodules.
221   - pushd > /dev/null
222   - cd "$clone_dir"
223   - git submodule update --recursive
224   - popd > /dev/null
  215 + (cd "$clone_dir" && git submodule update --recursive)
225 216 # Get the new revision.
226 217 local new_rev="$(--plugin-git rev-parse HEAD)"
227 218 fi