mirror of
https://github.com/clockfort/GitHub-Backup.git
synced 2025-03-16 00:00:06 +01:00
bugfix: do not alter objects, as these changes are global
This commit is contained in:
parent
458aa46501
commit
6a092ffdf9
1 changed files with 5 additions and 4 deletions
|
@ -65,9 +65,11 @@ def process_repo(repo, args):
|
||||||
|
|
||||||
def clone_repo(repo, dir, args):
|
def clone_repo(repo, dir, args):
|
||||||
if args.mirror:
|
if args.mirror:
|
||||||
args.git += " --mirror"
|
options = args.git + " --mirror"
|
||||||
|
else:
|
||||||
|
options = args.git
|
||||||
|
|
||||||
os.system('git clone %s %s %s'%(args.git, repo.git_url, dir))
|
os.system('git clone %s %s %s'%(options, repo.git_url, dir))
|
||||||
|
|
||||||
|
|
||||||
def update_repo(repo, dir, args):
|
def update_repo(repo, dir, args):
|
||||||
|
@ -76,8 +78,7 @@ def update_repo(repo, dir, args):
|
||||||
|
|
||||||
# GitHub => Local
|
# GitHub => Local
|
||||||
if args.mirror:
|
if args.mirror:
|
||||||
args.git += " --prune"
|
os.system("git fetch %s"%(args.git + " --prune",))
|
||||||
os.system("git fetch %s"%(args.git,))
|
|
||||||
else:
|
else:
|
||||||
os.system("git pull %s"%(args.git,))
|
os.system("git pull %s"%(args.git,))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue