Commit fae7cac7ef5accfcd112e14cc336180383f6f947

Authored by Xavier Garrido
1 parent 65520d3c6c

hide push/popd message. make git pull working with older git version

Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff

... ... @@ -210,11 +210,18 @@ antigen-revert () {
210 210 local old_rev="$(--plugin-git rev-parse HEAD)"
211 211 # Pull changes if update requested.
212 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
213 220 # Update submodules.
214   - pushd
  221 + pushd > /dev/null
215 222 cd "$clone_dir"
216 223 git submodule update --recursive
217   - popd
  224 + popd > /dev/null
218 225 # Get the new revision.
219 226 local new_rev="$(--plugin-git rev-parse HEAD)"
220 227 fi