From 3833a81c0cf0f3dc9f72d35782590e01051663f8 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Sun, 11 Jan 2015 20:21:05 -0500 Subject: [PATCH] Initializing the repo if needed --- lib/gdbgitdb.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index ca21e74..c70525e 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -34,6 +34,13 @@ class SaveGDBResults (ShellCommand): if not os.path.exists (builder_dir): os.mkdir (builder_dir) + if 'master' not in repo.heads: + with open (os.path.join (repodir, 'README'), 'w') as f: + f.write ("git repo for GDB test results") + repo.index.add (['README']) + repo.index.commit ('Initial commit') + repo.index.write () + if builder not in repo.heads: myhead = repo.create_head (builder) else: