mirror of
https://github.com/git/git.git
synced 2024-11-01 06:47:52 +01:00
d5d09d4754
This task emerged from b04ba2bb
(parse-options: deprecate OPT_BOOLEAN,
2011-09-27). All occurrences of the respective variables have
been reviewed and none of them relied on the counting up mechanism,
but all of them were using the variable as a true boolean.
This patch does not change semantics of any command intentionally.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
31 lines
787 B
C
31 lines
787 B
C
#include "builtin.h"
|
|
#include "cache.h"
|
|
#include "parse-options.h"
|
|
#include "bisect.h"
|
|
|
|
static const char * const git_bisect_helper_usage[] = {
|
|
N_("git bisect--helper --next-all [--no-checkout]"),
|
|
NULL
|
|
};
|
|
|
|
int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
|
|
{
|
|
int next_all = 0;
|
|
int no_checkout = 0;
|
|
struct option options[] = {
|
|
OPT_BOOL(0, "next-all", &next_all,
|
|
N_("perform 'git bisect next'")),
|
|
OPT_BOOL(0, "no-checkout", &no_checkout,
|
|
N_("update BISECT_HEAD instead of checking out the current commit")),
|
|
OPT_END()
|
|
};
|
|
|
|
argc = parse_options(argc, argv, prefix, options,
|
|
git_bisect_helper_usage, 0);
|
|
|
|
if (!next_all)
|
|
usage_with_options(git_bisect_helper_usage, options);
|
|
|
|
/* next-all */
|
|
return bisect_next_all(prefix, no_checkout);
|
|
}
|