Move some comments around.
authorStephen Haberman <stephen@exigencecorp.com>
Thu, 28 Aug 2008 16:16:50 +0000 (11:16 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Thu, 28 Aug 2008 16:16:50 +0000 (11:16 -0500)
scripts/gc-tattoo

index 8244c04..d7139ba 100644 (file)
@@ -1,14 +1,8 @@
 #!/bin/sh
 
-head=$(git rev-parse HEAD)
-
-# Watch out for the very first commit in the repo because we use head^ later
-git rev-parse --verify --quiet "$head^" >/dev/null
-if [ $? -ne 0 ] ; then
-       echo "0"
-       exit 0
-fi
-
+#
+# Some docs
+#
 # A --- B --- C    stable
 # |\         /
 # | D ----- E      topic1
@@ -31,6 +25,16 @@ fi
 # F: contains=topic1,topic2
 # C: contains=topic1
 
+head=$(git rev-parse HEAD)
+
+# Watch out for the very first commit in the repo because we use head^
+# Hopefully we can optimize this away later.
+git rev-parse --verify --quiet "$head^" >/dev/null
+if [ $? -ne 0 ] ; then
+       echo "0"
+       exit 0
+fi
+
 contains=($(git branch -r --contains $head))
 if [ ${#contains[@]} -eq 0 ] ; then
        echo "$head has not been pushed"