diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-27 14:58:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-27 14:58:08 -0800 |
commit | 2b0a564e02528e006d23e3318d0d2869fb239425 (patch) | |
tree | 76f46ae7b059ac9ca0e8b725fa67f89a3c078f16 /git-pull.sh | |
parent | e9ecee0423f2b24eb4e51d337044721c761cb4c3 (diff) | |
parent | ad8261d21221d27638c75f47b39892db6f7972f6 (diff) | |
download | git-2b0a564e02528e006d23e3318d0d2869fb239425.tar.gz |
Merge branch 'jk/pull-rebase-using-fork-point'
* jk/pull-rebase-using-fork-point:
rebase: use reflog to find common base with upstream
pull: use merge-base --fork-point when appropriate
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-x | git-pull.sh | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/git-pull.sh b/git-pull.sh index 97716b885f..f210d0a147 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -229,15 +229,7 @@ test true = "$rebase" && { test -n "$curr_branch" && . git-parse-remote && remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" && - oldremoteref="$(git rev-parse -q --verify "$remoteref")" && - for reflog in $(git rev-list -g $remoteref 2>/dev/null) - do - if test "$reflog" = "$(git merge-base $reflog $curr_branch)" - then - oldremoteref="$reflog" - break - fi - done + oldremoteref=$(git merge-base --fork-point "$remoteref" $curr_branch) } orig_head=$(git rev-parse -q --verify HEAD) git fetch $verbosity $progress $dry_run $recurse_submodules --update-head-ok "$@" || exit 1 |