summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry11
1 files changed, 9 insertions, 2 deletions
diff --git a/lorry b/lorry
index 09f58cb..90257b1 100755
--- a/lorry
+++ b/lorry
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (C) 2013-2019 Codethink Limited
+# Copyright (C) 2013-2020 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -98,6 +98,9 @@ class Lorry(cliapp.Application):
self.settings.boolean(['keep-multiple-backups'],
'keep multiple (time-stamped) backups (disabled by default)',
default=False)
+ self.settings.string_list(['push-option'],
+ "option for 'git push' to pass to the "
+ 'remote server')
def process_args(self, args):
status = 0
@@ -531,7 +534,11 @@ class Lorry(cliapp.Application):
self.run_program(['git', 'init', '--bare', pushurl], cwd=gitdir)
self.progress('.. pushing %s to mirror server %s' % (name, pushurl))
- self.run_program(['git', 'push', pushurl]+pushrefspecs, cwd=gitdir)
+ self.run_program(['git', 'push']
+ + ['--push-option=%s' % option
+ for option in self.settings['push-option']]
+ + [pushurl] + pushrefspecs,
+ cwd=gitdir)
def run_program(self, argv, **kwargs):
if self.settings['command-stdout']: