From 409f91e6ac4a325a16eb7b583e13525ea8a61619 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 23 Dec 2014 14:14:26 -0500 Subject: [PATCH] Making first commit if repo did not exist, try 2 --- lib/gdbgitdb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index 6504b5b..50e8b04 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -26,10 +26,9 @@ 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 () or not had_repo: + if not repo.branches or repo.is_dirty (): repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch]) repo.index.commit ('Log files for %s' % rev) repo.index.write ()