Re: Freeze break request: fix for branching from packages with multiple heads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



And it looks like git send-email doesn't attach the patch if you give it an introduction message, so here it is.
Any +1s?


commit 0c9d4490939f5c732e0e6ecbdeec0bf8da52497a
Author: Patrick Uiterwijk <puiterwijk@xxxxxxxxxx>
Date:   Wed Feb 25 10:50:18 2015 +0000

    Just always take the first commit returned on the master branch
    
    Some repos have multiple first master commits due to force-pushes.
    Without this, that would crash upon branching for those packages.
    
    Signed-off-by: Patrick Uiterwijk <puiterwijk@xxxxxxxxxx>

diff --git a/roles/distgit/files/mkbranch b/roles/distgit/files/mkbranch
index 1230571..9873202 100644
--- a/roles/distgit/files/mkbranch
+++ b/roles/distgit/files/mkbranch
@@ -147,7 +147,7 @@ for NAME in $PACKAGES ; do
     #}
     [ $VERBOSE -gt 0 ] && echo "Creating $NAME $BRANCH from $NAME ..."
     $(pushd $GITROOT/$NAME.git >/dev/null && \
-    git branch --no-track $BRANCH `git rev-list --max-parents=0 master` && \
+    git branch --no-track $BRANCH `git rev-list --max-parents=0 master | head -1` && \
     popd >/dev/null) || {
     echo "ERROR: Branch $NAME $BRANCH could not be created" >&2
         popd >/dev/null
[puiterwijk@lockbox01 files]$ 



With kind regards,
Patrick Uiterwijk
Fedora Infra

----- Original Message -----
> This makes sure that only a single commit is passed onto git branch.
> Sometimes, after a force push, a repo has multiple top-level commits for
> master.
> 
> _______________________________________________
> infrastructure mailing list
> infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/infrastructure
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure





[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux