summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-20 21:47:13 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-20 21:47:13 -0700
commit12d4ffaa94c1379c307cdf489565531c5d6c94fd (patch)
tree2e6897478bb7449bcd0bcb58022ae71af112c3f1 /git-pull.sh
parent451316d9bd9d117533cf32bb352bc370190075fc (diff)
parent62d955fd435273dcd9fffed0c0d83bbe90006a0a (diff)
downloadgit-12d4ffaa94c1379c307cdf489565531c5d6c94fd.tar.gz
Merge branch 'sb/pull-rebase'
* sb/pull-rebase: parse-remote: remove unused functions parse-remote: support default reflist in get_remote_merge_branch parse-remote: function to get the tracking branch to be merge
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/git-pull.sh b/git-pull.sh
index cab367ada0..4b78a0cd37 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -125,12 +125,9 @@ test true = "$rebase" && {
die "refusing to pull with rebase: your working tree is not up-to-date"
. git-parse-remote &&
- origin="$1"
- test -z "$origin" && origin=$(get_default_remote)
- reflist="$(get_remote_refs_for_fetch "$@" 2>/dev/null |
- sed "s|refs/heads/\(.*\):|\1|")" &&
+ reflist="$(get_remote_merge_branch "$@" 2>/dev/null)" &&
oldremoteref="$(git rev-parse -q --verify \
- "refs/remotes/$origin/$reflist")"
+ "$reflist")"
}
orig_head=$(git rev-parse -q --verify HEAD)
git fetch $verbosity --update-head-ok "$@" || exit 1