Permalink
Browse files

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.
  • Loading branch information...
1 parent 96f9ef5 commit 3c16e1f03b03b5b0362befb289094623ed17b414 @sharat87 sharat87 committed Feb 21, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 antigen.zsh
View
@@ -199,8 +199,7 @@ antigen-revert () {
# A temporary function wrapping the `git` command with repeated arguments.
--plugin-git () {
- eval git --no-pager \
- --git-dir=$clone_dir/.git --work-tree=$clone_dir "$@"
+ (cd "$clone_dir" && git --no-pager "$@")
}
# Clone if it doesn't already exist.
@@ -210,10 +209,9 @@ antigen-revert () {
# Save current revision.
local old_rev="$(--plugin-git rev-parse HEAD)"
# Pull changes if update requested.
- (cd "$clone_dir" && git --no-pager pull)
- #--plugin-git pull
+ --plugin-git pull
# Update submodules.
- (cd "$clone_dir" && git submodule update --recursive)
+ --plugin-git submodule update --recursive
# Get the new revision.
local new_rev="$(--plugin-git rev-parse HEAD)"
fi

0 comments on commit 3c16e1f

Please sign in to comment.