summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-06-28 12:53:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-28 12:53:32 -0700
commit6da2d9595161441cbed1b1f579b8dd46970a8e20 (patch)
tree1bde41b69722ae519ed4c29709e6c3f0dc87d1a6 /builtin
parentMerge branch 'pw/add-p-recount' (diff)
parentcompletion: collapse extra --no-.. options (diff)
downloadtgif-6da2d9595161441cbed1b1f579b8dd46970a8e20.tar.xz
Merge branch 'nd/completion-negation'
Continuing with the idea to programmatically enumerate various pieces of data required for command line completion, the codebase has been taught to enumerate options prefixed with "--no-" to negate them. * nd/completion-negation: completion: collapse extra --no-.. options completion: suppress some -no- options parse-options: option to let --git-completion-helper show negative form
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 2e1d2376d2..4c41d8b4c8 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1120,10 +1120,12 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
OPT_SET_INT('t', "track", &opts.track, N_("set upstream info for new branch"),
BRANCH_TRACK_EXPLICIT),
OPT_STRING(0, "orphan", &opts.new_orphan_branch, N_("new-branch"), N_("new unparented branch")),
- OPT_SET_INT('2', "ours", &opts.writeout_stage, N_("checkout our version for unmerged files"),
- 2),
- OPT_SET_INT('3', "theirs", &opts.writeout_stage, N_("checkout their version for unmerged files"),
- 3),
+ OPT_SET_INT_F('2', "ours", &opts.writeout_stage,
+ N_("checkout our version for unmerged files"),
+ 2, PARSE_OPT_NONEG),
+ OPT_SET_INT_F('3', "theirs", &opts.writeout_stage,
+ N_("checkout their version for unmerged files"),
+ 3, PARSE_OPT_NONEG),
OPT__FORCE(&opts.force, N_("force checkout (throw away local modifications)"),
PARSE_OPT_NOCOMPLETE),
OPT_BOOL('m', "merge", &opts.merge, N_("perform a 3-way merge with the new branch")),