From 6f83f2382cb4e02b205b19d7bb0ba09b505f4ded Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Sun, 19 Sep 2010 10:51:03 -0600 Subject: [PATCH] Bugfix: Rebasing the head ref Only use the ref being rebased onto otherwise git will create a detached HEAD. --- PBGitHistoryController.m | 6 ++---- PBRefController.m | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m index c61a464..a8bf5ac 100644 --- a/PBGitHistoryController.m +++ b/PBGitHistoryController.m @@ -671,10 +671,8 @@ - (IBAction) rebase:(id)sender { - if (selectedCommit) { - PBGitRef *headRef = [[repository headRef] ref]; - [repository rebaseBranch:headRef onRefish:selectedCommit]; - } + if (selectedCommit) + [repository rebaseBranch:nil onRefish:selectedCommit]; } #pragma mark - diff --git a/PBRefController.m b/PBRefController.m index 1b07f00..c9b8c2e 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -147,9 +147,8 @@ - (void) rebaseHeadBranch:(PBRefMenuItem *)sender { id refish = [sender refish]; - PBGitRef *headRef = [[historyController.repository headRef] ref]; - [historyController.repository rebaseBranch:headRef onRefish:refish]; + [historyController.repository rebaseBranch:nil onRefish:refish]; }