Fix SnapshotProvider failing on taking_snapshot without changes

This commit is contained in:
Kristóf Tóth 2018-08-01 17:19:31 +02:00
parent 2e97d18340
commit df0e24319d

View File

@ -66,10 +66,14 @@ class SnapshotProvider:
'git', 'add', 'git', 'add',
'-A' '-A'
)) ))
self._run(( try:
self._get_stdout((
'git', 'commit', 'git', 'commit',
'-m', 'Snapshot' '-m', 'Snapshot'
)) ))
except CalledProcessError as err:
if b'nothing to commit, working tree clean' not in err.output:
raise
def _check_head_not_detached(self): def _check_head_not_detached(self):
if self._head_detached: if self._head_detached: