]> git.alsa-project.org Git - alsa.git/commitdiff
pre-receive: create broken branch
authorJaroslav Kysela <perex@perex.cz>
Thu, 5 Mar 2009 10:15:18 +0000 (11:15 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 5 Mar 2009 10:15:18 +0000 (11:15 +0100)
hooks/alsa-kernel.git/pre-receive

index e6aecc7a3cd03f74a3d52916b2cf844805c58f6a..ed6898b5d02ae47dbd1dcb436de2596bcda2af4c 100755 (executable)
@@ -63,7 +63,9 @@ def error(lines, msg, *args):
 def fail(): 
     if ALSA_LAST_COMMIT:
         stderr.write('PRE-RECEIVE: Reverting alsa-kmirror.git repo to original state\n')
-        stderr.write('PRE-RECEIVE: alsa-kmirror.git problematic HEAD: %s\n' % popen('git --git-dir=%s rev-parse HEAD' % KMIRROR_REPO).read())
+        if system('git --git-dir=%s update-ref "refs/heads/broken" HEAD' % KMIRROR_REPO):
+            raise ValueError, "update-ref failed"
+        stderr.write('PRE-RECEIVE: alsa-kmirror.git problematic HEAD is in branch named "broken"\n')
         if system('git --git-dir=%s update-ref HEAD "refs/heads/master"' % KMIRROR_REPO):
             raise ValueError, "update-ref failed"
         if system('git --git-dir=%s reset -q --mixed %s > /dev/null' % (KMIRROR_REPO, ALSA_LAST_COMMIT)):