summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEllis Barnwell <ellisbarnwell@ct-lt-new.boot.codethink.co.uk>2021-10-13 11:51:34 +0100
committerEllis Barnwell <ellisbarnwell@ct-lt-new.boot.codethink.co.uk>2021-10-13 11:51:34 +0100
commit4367980eab0b7f501ade33a31ef120b6e2cfa73d (patch)
tree34bb25f6f6889c779c0a46411790362ca2e1354f
parent0847da03f385337f0303f0d723de7ba58c6329de (diff)
downloadlorry-controller-4367980eab0b7f501ade33a31ef120b6e2cfa73d.tar.gz
Reset to the branch supplied in the config
-rw-r--r--lorrycontroller/readconf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py
index b488765..c833645 100644
--- a/lorrycontroller/readconf.py
+++ b/lorrycontroller/readconf.py
@@ -131,8 +131,9 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
# Now move the current HEAD to wherever the remote master
# branch is, no questions asked. This doesn't do merging
# or any of the other things we don't want in this situation.
+ origin_branch = 'origin/' + self.app_settings['confgit-branch']
cliapp.runcmd(
- ['git', 'reset', '--hard', 'origin/master'], cwd=confdir)
+ ['git', 'reset', '--hard', origin_branch], cwd=confdir)
@property
def config_file_name(self):