Merge branch 'js/bisect-no-checkout'
authorJunio C Hamano <gitster@pobox.com>
Thu, 18 Aug 2011 00:36:09 +0000 (17:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Aug 2011 00:36:09 +0000 (17:36 -0700)
* js/bisect-no-checkout:
bisect: add support for bisecting bare repositories
bisect: further style nitpicks
bisect: replace "; then" with "\n<tab>*then"
bisect: cleanup whitespace errors in git-bisect.sh.
bisect: add documentation for --no-checkout option.
bisect: add tests for the --no-checkout option.
bisect: introduce --no-checkout support into porcelain.
bisect: introduce support for --no-checkout option.
bisect: add tests to document expected behaviour in presence of broken trees.
bisect: use && to connect statements that are deferred with eval.
bisect: move argument parsing before state modification.

1  2 
git.c
diff --combined git.c
index 304522b5324da5238a027a7bac5e665f1a907005,7fdcab29345b071a29a8040a39cfe2b6d4b29d7c..b660e36660a1fa836a7d0f71a6443bb0b530d644
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -7,8 -7,8 +7,8 @@@
  
  const char git_usage_string[] =
        "git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
 -      "           [-p|--paginate|--no-pager] [--no-replace-objects]\n"
 -      "           [--bare] [--git-dir=<path>] [--work-tree=<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>]";
  
@@@ -126,20 -126,6 +126,20 @@@ static int handle_options(const char **
                        setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1);
                        if (envchanged)
                                *envchanged = 1;
 +              } else if (!strcmp(cmd, "--namespace")) {
 +                      if (*argc < 2) {
 +                              fprintf(stderr, "No namespace given for --namespace.\n" );
 +                              usage(git_usage_string);
 +                      }
 +                      setenv(GIT_NAMESPACE_ENVIRONMENT, (*argv)[1], 1);
 +                      if (envchanged)
 +                              *envchanged = 1;
 +                      (*argv)++;
 +                      (*argc)--;
 +              } else if (!prefixcmp(cmd, "--namespace=")) {
 +                      setenv(GIT_NAMESPACE_ENVIRONMENT, cmd + 12, 1);
 +                      if (envchanged)
 +                              *envchanged = 1;
                } else if (!strcmp(cmd, "--work-tree")) {
                        if (*argc < 2) {
                                fprintf(stderr, "No directory given for --work-tree.\n" );
@@@ -334,7 -320,7 +334,7 @@@ static void handle_internal_command(in
                { "annotate", cmd_annotate, RUN_SETUP },
                { "apply", cmd_apply, RUN_SETUP_GENTLY },
                { "archive", cmd_archive },
-               { "bisect--helper", cmd_bisect__helper, RUN_SETUP | NEED_WORK_TREE },
+               { "bisect--helper", cmd_bisect__helper, RUN_SETUP },
                { "blame", cmd_blame, RUN_SETUP },
                { "branch", cmd_branch, RUN_SETUP },
                { "bundle", cmd_bundle, RUN_SETUP_GENTLY },