[damned-lies] Update git repo before checking out a new branch



commit b3a9acecda2410ce55421fa1d716898305614d6d
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Apr 18 21:54:03 2009 +0200

    Update git repo before checking out a new branch
    
    When adding a new branch to track, it might be that the branch has been
    recently added, so a 'git pull' is indicated to fetch new branches.
---
 stats/models.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stats/models.py b/stats/models.py
index 9309a86..9af7e0d 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -509,7 +509,7 @@ class Branch(models.Model):
                         "branch" : self.name,
                         })
                 else:
-                    commandList.append("cd \"%(localdir)s\" && git checkout --track -b %(branch)s  origin/%(branch)s" % {
+                    commandList.append("cd \"%(localdir)s\" && git pull && git checkout --track -b %(branch)s  origin/%(branch)s" % {
                         "localdir" : modulepath,
                         "branch" : self.name,
                         })



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