]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'mz/pull-rebase-rebased'
authorJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2010 05:49:51 +0000 (21:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2010 05:49:51 +0000 (21:49 -0800)
* mz/pull-rebase-rebased:
  Use reflog in 'pull --rebase . foo'

git-parse-remote.sh
t/t5520-pull.sh

index 4da72aefbd226f6f42af381b5d5a5a3178414576..1cc2ba6e09614fa55ad205145a3bdacfb78bf283 100644 (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
 }
index 0b489f5b1227268c050c1256d105d57d871f5698..0470a81be0edaf883788d313778ef6865ed34c6f 100755 (executable)
@@ -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