Commit 3c16e1f03b03b5b0362befb289094623ed17b414

Authored by Shrikant Sharat
1 parent 96f9ef5473

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.

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

... ... @@ -199,8 +199,7 @@ antigen-revert () {
199 199  
200 200 # A temporary function wrapping the `git` command with repeated arguments.
201 201 --plugin-git () {
202   - eval git --no-pager \
203   - --git-dir=$clone_dir/.git --work-tree=$clone_dir "$@"
  202 + (cd "$clone_dir" && git --no-pager "$@")
204 203 }
205 204  
206 205 # Clone if it doesn't already exist.
... ... @@ -210,10 +209,9 @@ antigen-revert () {
210 209 # Save current revision.
211 210 local old_rev="$(--plugin-git rev-parse HEAD)"
212 211 # Pull changes if update requested.
213   - (cd "$clone_dir" && git --no-pager pull)
214   - #--plugin-git pull
  212 + --plugin-git pull
215 213 # Update submodules.
216   - (cd "$clone_dir" && git submodule update --recursive)
  214 + --plugin-git submodule update --recursive
217 215 # Get the new revision.
218 216 local new_rev="$(--plugin-git rev-parse HEAD)"
219 217 fi