summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-02 01:26:37 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-02 01:26:37 +0000
commit2db03cd19c98ee6cb47d04c3a25fd7c11be26a96 (patch)
tree67f9337f323405badfae03bdae4be29d61626b68
parented3747e4ff721914d1df6b62788a91a1e8b3f741 (diff)
remove some redundant code -> faster sync speeds
-rw-r--r--src/backend/sync.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/sync.py b/src/backend/sync.py
index 5d3ac23..ebea39c 100644
--- a/src/backend/sync.py
+++ b/src/backend/sync.py
@@ -9,20 +9,16 @@ def portage():
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])
- gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE)
+ gitExecStage1 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
gitExecStage1.wait()
- gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
- gitExecStage2.wait()
def overlay():
os.chdir(sisyphus.filesystem.redcoreRepoDir)
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])
- gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE)
+ gitExecStage1 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
gitExecStage1.wait()
- gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
- gitExecStage2.wait()
def portageCfg():
os.chdir(sisyphus.filesystem.portageConfigDir)