From: Stephen Haberman Date: Thu, 28 Aug 2008 16:16:50 +0000 (-0500) Subject: Move some comments around. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0da3f0985b25b1735b0f32a02d63c520124bccf9;p=git-central.git Move some comments around. --- diff --git a/scripts/gc-tattoo b/scripts/gc-tattoo index 8244c04..d7139ba 100644 --- a/scripts/gc-tattoo +++ b/scripts/gc-tattoo @@ -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"