Jelajahi Sumber

change git_pull_zh

liushuai 3 bulan lalu
induk
melakukan
30d6efeff1
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  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)