X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=git.c;h=59f0fcc1f2278d3234a7e4a306db56c7cfcde9a2;hb=191a8e32b38c7ff0dd884df7bd323b7a5bd4336c;hp=2c9004f02e33180dcdbbc5b2e90266599ad41cc1;hpb=b84c343c885b8168047b2773b5c597d04337d9bd;p=git.git diff --git a/git.c b/git.c index 2c9004f02..59f0fcc1f 100644 --- a/git.c +++ b/git.c @@ -6,6 +6,9 @@ const char git_usage_string[] = "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]"; +const char git_more_info_string[] = + "See 'git help COMMAND' for more information on a specific command."; + static int handle_options(const char*** argv, int* argc, int* envchanged) { int handled = 0; @@ -283,7 +286,7 @@ static void handle_internal_command(int argc, const char **argv) { "checkout-index", cmd_checkout_index, RUN_SETUP | NEED_WORK_TREE}, { "check-ref-format", cmd_check_ref_format }, - { "check-attr", cmd_check_attr, RUN_SETUP | NEED_WORK_TREE }, + { "check-attr", cmd_check_attr, RUN_SETUP }, { "cherry", cmd_cherry, RUN_SETUP }, { "cherry-pick", cmd_cherry_pick, RUN_SETUP | NEED_WORK_TREE }, { "clone", cmd_clone }, @@ -294,7 +297,7 @@ static void handle_internal_command(int argc, const char **argv) { "count-objects", cmd_count_objects, RUN_SETUP }, { "describe", cmd_describe, RUN_SETUP }, { "diff", cmd_diff }, - { "diff-files", cmd_diff_files }, + { "diff-files", cmd_diff_files, RUN_SETUP }, { "diff-index", cmd_diff_index, RUN_SETUP }, { "diff-tree", cmd_diff_tree, RUN_SETUP }, { "fast-export", cmd_fast_export, RUN_SETUP }, @@ -427,6 +430,7 @@ int main(int argc, const char **argv) /* The user didn't specify a command; give them help */ printf("usage: %s\n\n", git_usage_string); list_common_cmds_help(); + printf("\n%s\n", git_more_info_string); exit(1); } cmd = argv[0];