]> git.ozlabs.org Git - next-scripts/commitdiff
Create the branch earlier so that it exists even if it is empty
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Jun 2008 01:32:15 +0000 (11:32 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Jun 2008 01:32:15 +0000 (11:32 +1000)
update_trees

index c17428c15734e0e47c0d01431ce3cbedb8457fae..eef12860513d5380eefbadd270e49b3922e37dce 100755 (executable)
@@ -53,6 +53,13 @@ for name in $quilters; do
                done <"$sfile.orig" >"$sfile"
        }
 
+       git show-ref --quiet --verify "refs/heads/quilt/$name" ||
+               execute git branch "quilt/$name" "$rbase" || sh -i || {
+                       [ -f "$sfile.orig" ] &&
+                               mv -f "$sfile.orig" "$sfile"
+                       exit 1
+               }
+
        mv -f "$sfile" "$sfile.tmp"
        sed -e '/^[     ]*$/d' -e '^[   ]*#/d' <"$sfile.tmp" >"$sfile"
        rm -f "$sfile.tmp"
@@ -63,12 +70,6 @@ for name in $quilters; do
                continue
        }
 
-       git show-ref --quiet --verify "refs/heads/quilt/$name" ||
-               execute git branch "quilt/$name" "$rbase" || sh -i || {
-                       [ -f "$sfile.orig" ] &&
-                               mv -f "$sfile.orig" "$sfile"
-                       exit 1
-               }
        execute git checkout "quilt/$name" || sh -i || {
                [ -f "$sfile.orig" ] &&
                        mv -f "$sfile.orig" "$sfile"