Using is_dirty to know when to commit things
This commit is contained in:
parent
e350a348bc
commit
9635be1ae7
1 changed files with 4 additions and 3 deletions
|
@ -27,8 +27,9 @@ class SaveGDBResults (ShellCommand):
|
|||
# Do nothing
|
||||
return SUCCESS
|
||||
repo = git.Repo.init (path = repodir)
|
||||
repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
|
||||
repo.index.commit ('Log files for %s' % rev)
|
||||
if repo.is_dirty ():
|
||||
repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
|
||||
repo.index.commit ('Log files for %s' % rev)
|
||||
repo.index.write ()
|
||||
repo.create_tag (rev)
|
||||
repo.index.write ()
|
||||
return SUCCESS
|
||||
|
|
Loading…
Reference in a new issue