From: Junio C Hamano Date: Thu, 15 Mar 2012 22:32:53 GMT Subject: Re: [PATCH] difftool: print list of valid tools with '--tool-help' Message-ID: <7vk42lijfu.fsf@alter.siamese.dyndns.org> In-Reply-To: <1331850311-4620-1-git-send-email-tim.henigan@gmail.com> Tim Henigan writes: > @@ -100,6 +101,15 @@ sub generate_command > if ($arg eq '-h') { > usage(); > } > + if ($arg eq '--tool-help') { > + my $gitpath = Git::exec_path(); > + print "'git difftool --tool=' may be set to one of the following:\n"; > + for (glob "$gitpath/mergetools/*") { > + next if /defaults$/; > + print "\t" . basename($_) . "\n"; > + } > + exit(1); > + } I know the call to usage() against "-h" has the same issue, but I think people find it offensive when they ask for help and the command reports a failure with a non-zero exit code. Other than that, looks good from a cursory look. Davidd, any comments? > push @command, $arg; > } > if ($prompt eq 'yes') {