Permalink
Browse files

Fix for 1.8.x changes to --set-upstream

  • Loading branch information...
1 parent f52b38c commit 4e73358b9e91680630366c80b74489b331ee5774 @jwhitcraft committed Jan 3, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 git-gh-compare
View
4 git-gh-compare
@@ -23,15 +23,15 @@ if [[ $link = ':...'* ]]; then
echo "Branch (${cbranch}) is not tracking a remote branch"
echo "To track a branch run the following command:"
- echo " git branch --set-upstream ${cbranch} <branch to track from>"
+ echo " git branch --set-upstream-to ${cbranch} <branch to track from>"
while true; do
read -p "Which Branch Do You Want to track? (enter \`exit\` to quit): " trackbranch
case $trackbranch in
exit ) exit;;
* )
git show-branch ${trackbranch} 1> /dev/null 2>&1
if [ $? == 0 ]; then
- git branch --set-upstream ${cbranch} ${trackbranch}
+ git branch --set-upstream-to ${cbranch} ${trackbranch}
link=$(git for-each-ref --format=':%(upstream:short)...%(refname:short)' $branch)
break
else

0 comments on commit 4e73358

Please sign in to comment.