diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index f5e23b6..6504b5b 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -26,9 +26,10 @@ class SaveGDBResults (ShellCommand): if istry and istry == 'yes': # Do nothing return SUCCESS + had_repo = os.path.exists (os.path.join (repodir, '.git')) repo = git.Repo.init (path = repodir) if rev not in repo.tags: - if repo.is_dirty (): + if repo.is_dirty () or not had_repo: repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch]) repo.index.commit ('Log files for %s' % rev) repo.index.write ()