[PATCH 09/14] [git] Switch branches previous to stash and pull

Now the refusal of the previously extracted function to switch dirty
branches will take effect. It is very unlikely that a user wants to
apply uncommited changes onto another branch by means of a jhbuild
update operation. Such an operation certainly deserves manual

This will now update the new branch instead of the previous one.

The problem with not finding recently added remote branches is solved in
a previous commit.

Signed-off-by: Dirk Wallenstein <halsmit t-online de>
 jhbuild/versioncontrol/git.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index fac7111..98d197c 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -354,6 +354,8 @@ class GitBranch(Branch):
         if update_mirror:
+        self._switch_branch_if_necessary(buildscript)
         stashed = False
         if self.is_dirty(ignore_submodules=True):
             stashed = True
@@ -371,8 +373,6 @@ class GitBranch(Branch):
             except CommandError:
                 raise CommandError(_('Failed to update module (corrupt .git?)'))
-        self._switch_branch_if_necessary(buildscript)
         if stashed:
             # git stash pop was introduced in 1.5.5, 
             if self._check_version_git('1.5.5'):

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]