From f4911f591ce7e41a146a87150c6922825b4c27d6 Mon Sep 17 00:00:00 2001 From: James Pearson Date: Mon, 10 Dec 2012 17:33:13 -0700 Subject: [PATCH] Hotfix: do branch update *always* on merge --- hotfix.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hotfix.rb b/hotfix.rb index 2249ff9..4a5fcc6 100755 --- a/hotfix.rb +++ b/hotfix.rb @@ -63,9 +63,6 @@ if ARGV[1] hotfix = BRANCH_PREFIX + ARGV[1] - # Checkout the branch to make sure we have it locally. - Git::run_safe("git checkout \"#{hotfix}\"") - Git::run_safe("git rebase --preserve-merges origin/#{hotfix}") else hotfix = Git::current_branch end @@ -74,6 +71,10 @@ description = Github::get_pull_request_description_from_api(hotfix, 'stable') + # Checkout the branch to make sure we have it locally. + Git::run_safe("git checkout \"#{hotfix}\"") + Git::run_safe("git rebase --preserve-merges origin/#{hotfix}") + # Merge into stable Git::run_safe("git checkout stable") # pull the latest changes and rebase the unpushed commits if any.