From 95a5e6655230d2718df33960435c1afec7529716 Mon Sep 17 00:00:00 2001 From: Kacper Kornet Date: Mon, 28 Mar 2011 12:41:01 +0100 Subject: [PATCH] Work around for git clone with GIT_WORK_TREE When git clone is called with GIT_WORK_TREE set it assumes that local repo should be bare and puts it in directory. To receive the usual layout it is necessary to unset locally GIT_WORK_TREE. --- builder.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builder.sh b/builder.sh index 8fda5ee..6dd722e 100755 --- a/builder.sh +++ b/builder.sh @@ -742,12 +742,15 @@ get_spec() { fi Exit_error err_not_implemented else - git clone ${GIT_SERVER}/${ASSUMED_NAME}.git || { - # softfail if new package, i.e not yet added to cvs - [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo - echo "Warning: package not in CVS - assuming new package" - NOCVSSPEC="yes" - } + ( + unset GIT_WORK_TREE + git clone ${GIT_SERVER}/${ASSUMED_NAME}.git || { + # softfail if new package, i.e not yet added to cvs + [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo + echo "Warning: package not in CVS - assuming new package" + NOCVSSPEC="yes" + } + ) fi cvsignore_df .gitignore -- 2.44.0