Browse Source

change git_pull_zh

liushuai 2 months ago
parent
commit
30d6efeff1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      preset/app/git.py

+ 3 - 3
preset/app/git.py

@@ -67,11 +67,11 @@ def checkout(localRep, branch, force=True, progStream=None):
     if progStream is None:
         progStream = NoneStream()
     try:
-        porcelain.checkout_branch(r, 'origin/' + branch, force=force, outstream=progStream)
+        porcelain.checkout_branch(r, branch, force=force, outstream=progStream)
     except porcelain.CheckoutError as e:
         print("CheckoutError:", e)
         porcelain.fetch(localRep)
-        porcelain.checkout_branch(r, 'origin/' + branch, force=force, outstream=progStream)
+        porcelain.checkout_branch(r, branch, force=force, outstream=progStream)
 
  
 def pull(localRep, progStream=None, force=True, depth=3):
@@ -132,4 +132,4 @@ def swRemote_force(localRep, remote_url):
 
 if __name__ == '__main__':
     localrep = "/home/backup"
-    log(localrep)
+    log(localrep)