From b027643169666b8d84617202f1a68b1880048a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 5 Jul 2010 15:13:38 +0200 Subject: [PATCH] fix git update --- module-tools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module-tools.py b/module-tools.py index 7aea7acd..52653eac 100755 --- a/module-tools.py +++ b/module-tools.py @@ -291,6 +291,10 @@ class GitRepository: return self.__run_in_repo(c.run_fatal) def update(self, subdir=None, recursive=None, branch="master"): + if branch == "master": + self.__run_command_in_repo("git checkout %s" % branch) + else: + self.__run_command_in_repo("git checkout origin/%s" % branch) self.__run_command_in_repo("git fetch origin --tags") self.__run_command_in_repo("git fetch origin") self.__run_command_in_repo("git merge --ff origin/%s" % branch) @@ -624,6 +628,8 @@ that for other purposes than tagging""" % options.workdir self.repository.update(branch=self.branch) elif hasattr(self,'tagname'): self.repository.update(branch=self.tagname) + else: + self.repository.update() def main_specname (self): attempt="%s/%s.spec"%(self.module_dir,self.name) -- 2.43.0