{"thread":{"id":"16407","subject":"[TopGit PATCH] Print help message when command is not proper","startedAt":"2008-11-20T12:08:48Z","lastAt":"2008-11-20T13:18:07Z","messageCount":2,"participants":["martin f. krafft","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96223","messageId":"1227182928-24916-1-git-send-email-madduck@debian.org","threadId":"16407","inReplyTo":null,"subject":"[TopGit PATCH] Print help message when command is not proper","fromName":"martin f. krafft","fromEmail":"madduck@debian.org","sentAt":"2008-11-20T12:08:48Z","receivedAt":"2008-11-20T12:08:48Z","isPatch":true,"sender":{"key":"madduck@debian.org","avatar":null},"body":"When invoked with an unknown subcommand, or when --help is sought for\na command that does not exist, TopGit prints the help message.\n\nSigned-off-by: martin f. krafft <madduck@debian.org>\n\n---\n tg.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/tg.sh b/tg.sh\nindex 4dcc15e..2464612 100644\n--- a/tg.sh\n+++ b/tg.sh\n@@ -232,6 +232,8 @@ do_help()\n \t\tfi\n \telse\n \t\techo \"`basename $0`: no help for $1\" 1>&2\n+\t\tdo_help\n+\t\texit 1\n \tfi\n }\n \n@@ -279,6 +281,7 @@ help|--help|-h)\n *)\n \t[ -r \"@cmddir@\"/tg-$cmd ] || {\n \t\techo \"Unknown subcommand: $cmd\" >&2\n+\t\tdo_help\n \t\texit 1\n \t}\n \t. \"@cmddir@\"/tg-$cmd;;\n-- \ntg: (f17218e..) fixes/more-help (depends on: upstream)\n"},{"id":"96236","messageId":"20081120131807.GE10491@machine.or.cz","threadId":"16407","inReplyTo":"1227182928-24916-1-git-send-email-madduck@debian.org","subject":"Re: [TopGit PATCH] Print help message when command is not proper","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2008-11-20T13:18:07Z","receivedAt":"2008-11-20T13:18:07Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Thu, Nov 20, 2008 at 01:08:48PM +0100, martin f. krafft wrote:\n> When invoked with an unknown subcommand, or when --help is sought for\n> a command that does not exist, TopGit prints the help message.\n> \n> Signed-off-by: martin f. krafft <madduck@debian.org>\n\nAcked-by: Petr Baudis <pasky@suse.cz>\n\nNote that I think these changes are reasonable only as long as do_help\nis just a short two-line usage help; in the event we also implement a\nlonger help, it certainly shouldn't be printed in these cases.\n"}]}