Using is_dirty to know when to commit things

This commit is contained in:
Sergio Durigan Junior 2014-12-23 02:16:43 -05:00
parent e350a348bc
commit 9635be1ae7

View file

@ -27,8 +27,9 @@ class SaveGDBResults (ShellCommand):
# Do nothing
return SUCCESS
repo = git.Repo.init (path = repodir)
if repo.is_dirty ():
repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
repo.index.commit ('Log files for %s' % rev)
repo.create_tag (rev)
repo.index.write ()
repo.create_tag (rev)
return SUCCESS