1
0
mirror of https://github.com/git/git synced 2024-07-05 00:58:49 +00:00

Merge branch 'mz/pull-rebase-rebased'

* mz/pull-rebase-rebased:
  Use reflog in 'pull --rebase . foo'
This commit is contained in:
Junio C Hamano 2010-12-12 21:49:51 -08:00
commit 73fd7f3761
2 changed files with 15 additions and 2 deletions

View File

@ -89,7 +89,13 @@ get_remote_merge_branch () {
refs/heads/*) remote=${remote#refs/heads/} ;;
refs/* | tags/* | remotes/* ) remote=
esac
[ -n "$remote" ] && echo "refs/remotes/$repo/$remote"
[ -n "$remote" ] && case "$repo" in
.)
echo "refs/heads/$remote"
;;
*)
echo "refs/remotes/$repo/$remote"
;;
esac
esac
}

View File

@ -222,4 +222,11 @@ test_expect_success 'git pull --rebase does not reapply old patches' '
)
'
test_expect_success 'git pull --rebase against local branch' '
git checkout -b copy2 to-rebase-orig &&
git pull --rebase . to-rebase &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
'
test_done