From 25405b226bf35fe8edfc074e7d23783f86419cd4 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 27 Mar 2012 14:29:13 -0400 Subject: [PATCH] [Fix #67] Rename git-branch to git-current-branch There is a name collision in Git versions older than 1.6.0, which install the git-* commands in $PATH. --- plugins/git/alias.zsh | 4 ++-- plugins/git/functions/{git-branch => git-current-branch} | 0 plugins/git/functions/git-hub | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename plugins/git/functions/{git-branch => git-current-branch} (100%) diff --git a/plugins/git/alias.zsh b/plugins/git/alias.zsh index c30c9373..95bb0839 100644 --- a/plugins/git/alias.zsh +++ b/plugins/git/alias.zsh @@ -154,9 +154,9 @@ alias gpA='git push --all && git push --tags' compdef _git gpA=git-push alias gpt='git push --tags' compdef _git gpt=git-push -alias gpc='git push --set-upstream origin "$(git-branch)"' +alias gpc='git push --set-upstream origin "$(git-current-branch)"' compdef _git gpc=git-push -alias gpp='git pull origin "$(git-branch)" && git push origin "$(git-branch)"' +alias gpp='git pull origin "$(git-current-branch)" && git push origin "$(git-branch)"' # Rebase (r) alias gr='git rebase' diff --git a/plugins/git/functions/git-branch b/plugins/git/functions/git-current-branch similarity index 100% rename from plugins/git/functions/git-branch rename to plugins/git/functions/git-current-branch diff --git a/plugins/git/functions/git-hub b/plugins/git/functions/git-hub index 59cb82a2..dd3ce386 100644 --- a/plugins/git/functions/git-hub +++ b/plugins/git/functions/git-hub @@ -16,7 +16,7 @@ url=$( branches=($( git branch -r | sed -e "/${remote}\/HEAD -> ${remote}/d" -e "s/^[[:space:]]*${remote}\///g" )) -current_branch="$(git-branch)" +current_branch="$(git-current-branch)" branch="${2:-master}" file="$3"