ソースを参照

change git_pull_zh

liushuai 2 ヶ月 前
コミット
30d6efeff1
1 ファイル変更3 行追加3 行削除
  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)