From: Junio C Hamano Date: Thu, 18 Aug 2011 00:36:09 +0000 (-0700) Subject: Merge branch 'js/bisect-no-checkout' X-Git-Tag: v1.7.7-rc0~24 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/da68bf337664f6160d56153cfe4a38c49a5185f3?ds=inline;hp=-c Merge branch 'js/bisect-no-checkout' * js/bisect-no-checkout: bisect: add support for bisecting bare repositories bisect: further style nitpicks bisect: replace "; then" with "\n*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. --- da68bf337664f6160d56153cfe4a38c49a5185f3 diff --combined git.c index 304522b532,7fdcab2934..b660e36660 --- a/git.c +++ b/git.c @@@ -7,8 -7,8 +7,8 @@@ const char git_usage_string[] = "git [--version] [--exec-path[=]] [--html-path] [--man-path] [--info-path]\n" - " [-p|--paginate|--no-pager] [--no-replace-objects]\n" - " [--bare] [--git-dir=] [--work-tree=]\n" + " [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n" + " [--git-dir=] [--work-tree=] [--namespace=]\n" " [-c name=value] [--help]\n" " []"; @@@ -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 },