Make coding style more consistent

This commit is contained in:
Kristóf Tóth 2018-07-19 11:11:56 +02:00
parent 85523ede32
commit dd056a37bb

View File

@ -41,18 +41,28 @@ class SnapshotProvider:
def take_snapshot(self):
if self._head_detached:
self._checkout_new_branch_from_head()
self._run(('git', 'add', '-A'))
self._run(('git', 'commit', '-m', 'Snapshot'))
self._run((
'git', 'add',
'-A'
))
self._run((
'git', 'commit',
'-m', 'Snapshot'
))
def _checkout_new_branch_from_head(self):
head_hash = self._get_head_hash()
self._run((
'git', 'checkout',
'-b', head_hash, head_hash
'-b', head_hash,
head_hash
))
def _get_head_hash(self):
return self._get_stdout(('git', 'rev-parse', 'HEAD'))
return self._get_stdout((
'git', 'rev-parse',
'HEAD'
))
def restore_snapshot(self, date):
commit = self._get_commit_from_timestamp(date)