From ea48d2a2a910c46bb409285f87504bacb0b3eb79 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 19 Feb 2015 15:56:26 +0000 Subject: [PATCH] When a bare repo is created, HEAD is invalid, so cloning won't work. --- roles/distgit/files/setup_git_package | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/distgit/files/setup_git_package b/roles/distgit/files/setup_git_package index 4b30d5aebd..05729b3c83 100644 --- a/roles/distgit/files/setup_git_package +++ b/roles/distgit/files/setup_git_package @@ -100,11 +100,12 @@ git config --add hooks.maildomain fedoraproject.org popd >/dev/null # Now clone that repo and create the .gitignore and sources file -git clone -q /srv/git/rpms/$PACKAGE.git $TMPDIR/$PACKAGE +git init -q $TMPDIR/$PACKAGE pushd $TMPDIR/$PACKAGE >/dev/null touch .gitignore sources git add . git commit -q -m 'Initial setup of the repo' --author "$AUTHOR" +git remote add origin $GITROOT/$PACKAGE.git git push -q origin master popd >/dev/null