chiark / gitweb /
TopGit-0.4
[topgit.git] / tg.sh
diff --git a/tg.sh b/tg.sh
index 6c28467d8829f46d370c415d051ff453cf0e646c..7005f98c882bde7c97094862aeb88b07b28de390 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -26,7 +26,7 @@ setup_hook()
                # Another job well done!
                return
        fi
-       # Prepare incanation
+       # Prepare incantation
        if [ -x "$git_dir/hooks/$1" ]; then
                hook_call="$hook_call"' || exit $?'
        else
@@ -77,7 +77,7 @@ measure_branch()
 # Whether B1 is a superset of B2.
 branch_contains()
 {
-       [ -z "$(git rev-list ^"$1" "$2")" ]
+       [ -z "$(git rev-list ^"$1" "$2" --)" ]
 }
 
 # ref_exists REF
@@ -222,10 +222,14 @@ do_help()
                        sep="|"
                done
 
-               echo "TopGit v0.2 - A different patch queue manager"
+               echo "TopGit v0.4 - A different patch queue manager"
                echo "Usage: tg [-r REMOTE] ($cmds|help) ..."
-       elif [ -r "@sharedir@/tg-$1.txt" ] ; then
-               cat "@sharedir@/tg-$1.txt"
+       elif [ -r "@cmddir@"/tg-$1 ] ; then
+               @cmddir@/tg-$1 -h || :
+               echo
+               if [ -r "@sharedir@/tg-$1.txt" ] ; then
+                       cat "@sharedir@/tg-$1.txt"
+               fi
        else
                echo "`basename $0`: no help for $1" 1>&2
        fi