Making first commit if repo did not exist
This commit is contained in:
parent
d3e85f9afd
commit
51b1d30f9f
1 changed files with 2 additions and 1 deletions
|
@ -26,9 +26,10 @@ class SaveGDBResults (ShellCommand):
|
||||||
if istry and istry == 'yes':
|
if istry and istry == 'yes':
|
||||||
# Do nothing
|
# Do nothing
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
had_repo = os.path.exists (os.path.join (repodir, '.git'))
|
||||||
repo = git.Repo.init (path = repodir)
|
repo = git.Repo.init (path = repodir)
|
||||||
if rev not in repo.tags:
|
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.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
|
||||||
repo.index.commit ('Log files for %s' % rev)
|
repo.index.commit ('Log files for %s' % rev)
|
||||||
repo.index.write ()
|
repo.index.write ()
|
||||||
|
|
Loading…
Reference in a new issue