chiark / gitweb /
tg.sh: Add -h, --help aliases for the help command
[topgit.git] / tg.sh
diff --git a/tg.sh b/tg.sh
index 179f0de21bdfc37893afa4d3f90f43460d330b6c..d520a230096ebdfbe442af71f333c59c7a9a1c32 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -45,11 +45,11 @@ setup_hook()
 # setup_ours (no arguments)
 setup_ours()
 {
-       if [ ! -s "$git_dir/info/gitattributes" ] || ! grep -q topmsg "$git_dir/info/gitattributes"; then
+       if [ ! -s "$git_dir/info/attributes" ] || ! grep -q topmsg "$git_dir/info/attributes"; then
                {
                        echo -e ".topmsg\tmerge=ours"
                        echo -e ".topdeps\tmerge=ours"
-               } >>"$git_dir/info/gitattributes"
+               } >>"$git_dir/info/attributes"
        fi
        if ! git config merge.ours.driver >/dev/null; then
                git config merge.ours.name '"always keep ours" merge driver'
@@ -167,7 +167,7 @@ do_help()
 
                echo "TopGit v0.1 - A different patch queue manager"
                echo "Usage: tg ($cmds|help) ..."
-       elif [ -f "@sharedir@/tg-$1.txt" ] ; then
+       elif [ -r "@sharedir@/tg-$1.txt" ] ; then
                cat "@sharedir@/tg-$1.txt"
        else
                echo "`basename $0`: no help for $1" 1>&2
@@ -198,7 +198,7 @@ cmd="$1"
 shift
 
 case "$cmd" in
-help)
+help|--help|-h)
        do_help "$1"
        exit 1;;
 --hooks-path)