git.droids-corp.org
/
git-central.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f7355d
)
Move some comments around.
author
Stephen Haberman
<stephen@exigencecorp.com>
Thu, 28 Aug 2008 16:16:50 +0000
(11:16 -0500)
committer
Stephen Haberman
<stephen@exigencecorp.com>
Thu, 28 Aug 2008 16:16:50 +0000
(11:16 -0500)
scripts/gc-tattoo
patch
|
blob
|
history
diff --git
a/scripts/gc-tattoo
b/scripts/gc-tattoo
index
8244c04
..
d7139ba
100644
(file)
--- a/
scripts/gc-tattoo
+++ b/
scripts/gc-tattoo
@@
-1,14
+1,8
@@
#!/bin/sh
#!/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
# A --- B --- C stable
# |\ /
# | D ----- E topic1
@@
-31,6
+25,16
@@
fi
# F: contains=topic1,topic2
# C: contains=topic1
# 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"
contains=($(git branch -r --contains $head))
if [ ${#contains[@]} -eq 0 ] ; then
echo "$head has not been pushed"