]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Work around for git clone with GIT_WORK_TREE
authorKacper Kornet <draenog@pld-linux.org>
Mon, 28 Mar 2011 11:41:01 +0000 (12:41 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Mon, 28 Mar 2011 12:59:23 +0000 (13:59 +0100)
When git clone is called with GIT_WORK_TREE set it assumes that local
repo should be bare and puts it in <name> directory. To receive the
usual layout it is necessary to unset locally GIT_WORK_TREE.

builder.sh

index 8fda5eee65a5c579628495bbc1adff9ab57ff94c..6dd722e6be676cf8c005d189e561f3dcaca0b46c 100755 (executable)
@@ -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
This page took 0.04949 seconds and 4 git commands to generate.