From 9476bf6f8a782904bb9efc9eb67b69828ca84267 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 12 Mar 2013 08:06:45 -0400 Subject: [PATCH] givi - Fix handling of Drupal branches (filtered branch names) when running "resume" --- bin/givi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/givi b/bin/givi index 6d4b9f5773..643ad9d9f3 100755 --- a/bin/givi +++ b/bin/givi @@ -264,6 +264,7 @@ class Givi { foreach ($this->repos as $repo => $relPath) { $filteredBranch = $this->filterBranchName($repo, $branches[$repo]); $filteredBaseBranch = $this->filterBranchName($repo, $baseBranch); + if ($filteredBranch == $filteredBaseBranch) { $this->run($relPath, 'git', 'checkout', $filteredBranch); } @@ -286,10 +287,12 @@ class Givi { } foreach ($this->repos as $repo => $relPath) { - $this->run($relPath, 'git', 'checkout', $branches[$repo]); - if ($branches[$repo] != $baseBranch && $this->rebase) { - // FIXME: assumes - list ($baseRemoteRepo, $baseRemoteBranch) = $this->parseBranchRepo($baseBranch); + $filteredBranch = $this->filterBranchName($repo, $branches[$repo]); + $filteredBaseBranch = $this->filterBranchName($repo, $baseBranch); + + $this->run($relPath, 'git', 'checkout', $filteredBranch); + if ($filteredBranch != $filteredBaseBranch && $this->rebase) { + list ($baseRemoteRepo, $baseRemoteBranch) = $this->parseBranchRepo($filteredBaseBranch); $this->run($relPath, 'git', 'pull', '--rebase', $baseRemoteRepo, $baseRemoteBranch); } } -- 2.25.1