aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/git
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-07 15:02:38 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-07 15:05:22 +0100
commitfa06c7d49af77a707cdd267d9ec9bea298440561 (patch)
treebd583acdd7304985ba61d572f24c6c825549ed4b /gbp/git
parent5b1614d19a1b17a93c82f1adc47361cdd73043bd (diff)
GitRepository: force_head: use GitArgs
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index aa934f4f..aeaa5a36 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -823,11 +823,10 @@ class GitRepository(object):
ref = "refs/heads/%s" % self.get_branch()
self._git_command("update-ref", [ref, commit])
else:
- args = ['--quiet']
- if hard:
- args += ['--hard']
- args += [commit, '--']
- self._git_command("reset", args)
+ args = GitArgs('--quiet')
+ args.add_true(hard, '--hard')
+ args.add(commit, '--')
+ self._git_command("reset", args.args)
def _status(self, porcelain, ignore_untracked, paths):
args = GitArgs()