Browse Source

pull 没有-u参数

liuyuqi-dellpc 1 year ago
parent
commit
bd1bc2684c

+ 2 - 2
repo_sync/platform/coding/coding.py

@@ -182,7 +182,7 @@ class CodingIE(BasePlatform):
         result = subprocess.run(
             ['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_coding {current_branch}')
+        os.system(f'git pull origin_coding {current_branch}')
         os.system('git remote remove origin_coding')
         os.chdir('..')
         print('pull success')
@@ -203,7 +203,7 @@ class CodingIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_coding {current_branch}')
+        os.system(f'git pull origin_coding {current_branch}')
         
         os.system(f'git push -u origin_coding {current_branch}')
         os.system('git remote remove origin_coding')

+ 2 - 2
repo_sync/platform/gitee.py

@@ -83,7 +83,7 @@ class GiteeIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gitee {current_branch}')
+        os.system(f'git pull origin_gitee {current_branch}')
         os.system('git remote remove origin_gitee')
         os.chdir('..')
         print('pull from gitee success')
@@ -100,7 +100,7 @@ class GiteeIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gitee {current_branch}')
+        os.system(f'git pull origin_gitee {current_branch}')
         
         os.system(f'git push -u origin_gitee {current_branch}')
         os.system('git remote remove origin_gitee')

+ 2 - 2
repo_sync/platform/github.py

@@ -81,7 +81,7 @@ class GithubIE(BasePlatform):
         result = subprocess.run(
             ['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_github {current_branch}')
+        os.system(f'git pull origin_github {current_branch}')
         os.system('git remote remove origin_github')
         os.chdir('..')
         print('pull from github success')
@@ -105,7 +105,7 @@ class GithubIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_github {current_branch}')
+        os.system(f'git pull origin_github {current_branch}')
         
         os.system(f'git push -u origin_github {current_branch}')
         os.system('git remote remove origin_github')

+ 2 - 2
repo_sync/platform/gitlab.py

@@ -100,7 +100,7 @@ class GitlabIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gitlab {current_branch}')
+        os.system(f'git pull origin_gitlab {current_branch}')
         os.system("git remote remove origin_gitlab")
         os.chdir("..")
         print(f"pull repo:{self.username}/{repo_name} from gitlab success")
@@ -125,7 +125,7 @@ class GitlabIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gitlab {current_branch}')
+        os.system(f'git pull origin_gitlab {current_branch}')
         
         os.system(f"git push -u origin_gitlab {current_branch}")
         os.system("git remote remove origin_gitlab")

+ 2 - 2
repo_sync/platform/gogs.py

@@ -100,7 +100,7 @@ class GogsIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gogs {current_branch}')
+        os.system(f'git pull origin_gogs {current_branch}')
         os.system('git remote remove origin_gogs')
         os.chdir('..')
     
@@ -119,7 +119,7 @@ class GogsIE(BasePlatform):
         )
         result = subprocess.run(['git', 'symbolic-ref', '--short', 'HEAD'], capture_output=True, text=True)
         current_branch = result.stdout.strip()
-        os.system(f'git pull -u origin_gogs {current_branch}')
+        os.system(f'git pull origin_gogs {current_branch}')
         os.system(f'git push -u origin_gogs {current_branch}')
         os.system('git remote remove origin_gogs')
         os.chdir('..')