X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg.sh;h=08975aef00d6b71a79c5cbdd4d1baa6aa2df0159;hb=97ce88672c1c2bd6decabc54f5ae1e08e4ea8f32;hp=6c28467d8829f46d370c415d051ff453cf0e646c;hpb=dfe1670c129c1ec6f46ae7b5cc610201a59cfbfd;p=topgit.git diff --git a/tg.sh b/tg.sh index 6c28467..08975ae 100644 --- 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.3 - 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