From fa9a255ac46de1995ab558fe2681be46243cb091 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Tue, 20 Mar 2012 14:53:29 +0800 Subject: [PATCH] Fixed branch iteration for array in _git_index_update_all_branches function --- lib/git/repo_index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/repo_index.sh b/lib/git/repo_index.sh index 30c24c1..8cf744b 100644 --- a/lib/git/repo_index.sh +++ b/lib/git/repo_index.sh @@ -225,7 +225,7 @@ _git_index_update_all_branches() { local index=0 # Iterate over branches, and update those that can be fast-forwarded - for branch in $branches; do + for branch in ${branches[@]}; do branch_rev="$(git rev-parse $branch)" # Local branch can be fast-forwarded if revision is ancestor of remote revision, and not the same. # (see http://stackoverflow.com/a/2934062/304706)