[jhbuild] [git] Rename would_be_branch to wanted_branch



commit bebfafbe6290e99b1fdcfd4a38e75b4e4526c905
Author: Dirk Wallenstein <halsmit t-online de>
Date:   Sun May 16 13:29:59 2010 +0200

    [git] Rename would_be_branch to wanted_branch
    
    This seems to better describe the purpose.

 jhbuild/versioncontrol/git.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index 97c907a..f4eccf9 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -326,23 +326,23 @@ class GitBranch(Branch):
             except CommandError:
                 raise CommandError(_('Failed to update module (corrupt .git?)'))
 
-        would_be_branch = self.branch or 'master'
+        wanted_branch = self.branch or 'master'
         if self.tag:
             buildscript.execute(['git', 'checkout', self.tag], **git_extra_args)
         else:
-            if not current_branch or current_branch != would_be_branch:
+            if not current_branch or current_branch != wanted_branch:
                 if not current_branch:
                     # if user was not on any branch, get back to a known track
                     current_branch = 'master'
                 # if current branch doesn't exist as origin/$branch it is assumed
                 # a local work branch, and it won't be changed
                 if self._is_tracking_a_remote_branch(current_branch):
-                    if self.local_branch_exist(would_be_branch, buildscript):
-                        buildscript.execute(['git', 'checkout', would_be_branch],
+                    if self.local_branch_exist(wanted_branch, buildscript):
+                        buildscript.execute(['git', 'checkout', wanted_branch],
                                 **git_extra_args)
                     else:
                         buildscript.execute(['git', 'checkout', '--track', '-b',
-                            would_be_branch, 'origin/' + would_be_branch],
+                            wanted_branch, 'origin/' + wanted_branch],
                             **git_extra_args)
 
         if stashed:



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