1
0
Fork 0
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:
Steffen Vogel 2013-08-27 13:33:41 +02:00
parent 458aa46501
commit 6a092ffdf9

View file

@ -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,))