From 9eaa2c8af8428a10a933a19fbd33484e04547d99 Mon Sep 17 00:00:00 2001 From: Andrew Hastings Date: Wed, 5 May 2021 19:47:53 -0500 Subject: [PATCH] Bugfix: fix integration with git command -h "git vendor -h" produces an unhelpful message: $ git vendor -h usage: git vendor Move some code so a proper usage message will be issued. Note that "git vendor --help" is processed by the "git" binary (not "git-vendor") and thus is unaffected by this change. --- bin/git-vendor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/git-vendor b/bin/git-vendor index c10d08a..3c12cf9 100755 --- a/bin/git-vendor +++ b/bin/git-vendor @@ -16,14 +16,14 @@ Usage: EOF } +case "$1" in + ""|"-h"|"--help") _usage && exit ;; +esac + PATH=$PATH:$(git --exec-path) . git-sh-setup require_work_tree -case "$1" in - ""|"--help") _usage && exit ;; -esac - command="$1" shift case "$command" in