If you run "git stash --help", you get the help for stash
(this magic is done by the git wrapper itself). But if you
run "git stash drop --help", you get an error. We
cannot show help specific to "stash drop", of course, but we
can at least give the user the normal stash manpage.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-a|--all)
untracked=all
;;
+ --help)
+ show_help
+ ;;
--)
shift
break
git diff ${FLAGS:---stat} $b_commit $w_commit
}
+show_help () {
+ exec git help stash
+ exit 1
+}
+
#
# Parses the remaining options looking for flags and
# at most one revision defaulting to ${ref_stash}@{0}
--index)
INDEX_OPTION=--index
;;
+ --help)
+ show_help
+ ;;
-*)
test "$ALLOW_UNKNOWN_FLAGS" = t ||
die "$(eval_gettext "unknown option: \$opt")"