]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Mar 2013 20:00:16 +0000 (13:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Mar 2013 20:00:16 +0000 (13:00 -0700)
* maint:
  git.c: make usage match manual page

1  2 
git.c

diff --combined git.c
index 86c4432db59879b433c478494cda9fb322563de7,c598dc63670ba49d9f6f720834df788dc41b3a44..39ba6b14618389bc9312df43a376b52f9a21d881
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -6,10 -6,10 +6,10 @@@
  #include "run-command.h"
  
  const char git_usage_string[] =
-       "git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
+       "git [--version] [--help] [-c name=value]\n"
+       "           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
        "           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n"
        "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
-       "           [-c name=value] [--help]\n"
        "           <command> [<args>]";
  
  const char git_more_info_string[] =
@@@ -135,14 -135,6 +135,14 @@@ static int handle_options(const char **
                        git_config_push_parameter((*argv)[1]);
                        (*argv)++;
                        (*argc)--;
 +              } else if (!strcmp(cmd, "--literal-pathspecs")) {
 +                      setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "1", 1);
 +                      if (envchanged)
 +                              *envchanged = 1;
 +              } else if (!strcmp(cmd, "--no-literal-pathspecs")) {
 +                      setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "0", 1);
 +                      if (envchanged)
 +                              *envchanged = 1;
                } else {
                        fprintf(stderr, "Unknown option: %s\n", cmd);
                        usage(git_usage_string);
@@@ -313,7 -305,6 +313,7 @@@ static void handle_internal_command(in
                { "bundle", cmd_bundle, RUN_SETUP_GENTLY },
                { "cat-file", cmd_cat_file, RUN_SETUP },
                { "check-attr", cmd_check_attr, RUN_SETUP },
 +              { "check-ignore", cmd_check_ignore, RUN_SETUP | NEED_WORK_TREE },
                { "check-ref-format", cmd_check_ref_format },
                { "checkout", cmd_checkout, RUN_SETUP | NEED_WORK_TREE },
                { "checkout-index", cmd_checkout_index,