summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-01 13:46:06 +0000
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-01 13:46:06 +0000
commita7026c2705652754144fdcebb4596f5aca3ae560 (patch)
treee5d6388c6c5478c61fa985a0c9088c803f4b8df0 /lorry
parentf9a76999b3300284c45f7ed9f7867b74f5f2dd92 (diff)
parent541ed6ed37d23fa9b1693aca582e1aad25497ce2 (diff)
downloadlorry-a7026c2705652754144fdcebb4596f5aca3ae560.tar.gz
Merge branch 'bwh/push-options' into 'master'
lorry: Add support for push options Closes #2 See merge request CodethinkLabs/lorry!4
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']: