Skip to content

Commit

Permalink
default to configured upstream remote instead of origin
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonjs committed Aug 26, 2015
1 parent c31b5cb commit 1bdd34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-update
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e # bail on errors

REMOTE="${1:-origin}"
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
ORIG_BRANCH=$(git rev-parse --abbrev-ref HEAD)
REMOTE="${1:-$(git config --get branch.${ORIG_BRANCH}.remote)}"
if [[ "$ORIG_BRANCH" = "HEAD" ]]; then
echo "Cannot update in a detached HEAD state"
exit 1
Expand Down

0 comments on commit 1bdd34d

Please sign in to comment.