read-tree: use OPT_BOOL instead of OPT_SET_INT

All occurrences of OPT_SET_INT were setting the value to 1; internally OPT_BOOL is just that. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Jan 9, 2017 at 17:45 UTC 84a7f09625685b2093ff0221ad855f5f783b4b4a
1 file changed +18 -18
builtin/read-tree.c
+18 -18
@@ -109,34 +109,34 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
109 { OPTION_CALLBACK, 0, "index-output", NULL, N_("file"),
110 N_("write resulting index to <file>"),
111 PARSE_OPT_NONEG, index_output_cb },
112 - OPT_SET_INT(0, "empty", &read_empty,
113 - N_("only empty the index"), 1),
112 + OPT_BOOL(0, "empty", &read_empty,
113 + N_("only empty the index")),
114 OPT__VERBOSE(&opts.verbose_update, N_("be verbose")),
115 OPT_GROUP(N_("Merging")),
116 - OPT_SET_INT('m', NULL, &opts.merge,
117 - N_("perform a merge in addition to a read"), 1),
118 - OPT_SET_INT(0, "trivial", &opts.trivial_merges_only,
119 - N_("3-way merge if no file level merging required"), 1),
120 - OPT_SET_INT(0, "aggressive", &opts.aggressive,
121 - N_("3-way merge in presence of adds and removes"), 1),
122 - OPT_SET_INT(0, "reset", &opts.reset,
123 - N_("same as -m, but discard unmerged entries"), 1),
116 + OPT_BOOL('m', NULL, &opts.merge,
117 + N_("perform a merge in addition to a read")),
118 + OPT_BOOL(0, "trivial", &opts.trivial_merges_only,
119 + N_("3-way merge if no file level merging required")),
120 + OPT_BOOL(0, "aggressive", &opts.aggressive,
121 + N_("3-way merge in presence of adds and removes")),
122 + OPT_BOOL(0, "reset", &opts.reset,
123 + N_("same as -m, but discard unmerged entries")),
124 { OPTION_STRING, 0, "prefix", &opts.prefix, N_("<subdirectory>/"),
125 N_("read the tree into the index under <subdirectory>/"),
126 PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP },
127 - OPT_SET_INT('u', NULL, &opts.update,
128 - N_("update working tree with merge result"), 1),
127 + OPT_BOOL('u', NULL, &opts.update,
128 + N_("update working tree with merge result")),
129 { OPTION_CALLBACK, 0, "exclude-per-directory", &opts,
130 N_("gitignore"),
131 N_("allow explicitly ignored files to be overwritten"),
132 PARSE_OPT_NONEG, exclude_per_directory_cb },
133 - OPT_SET_INT('i', NULL, &opts.index_only,
134 - N_("don't check the working tree after merging"), 1),
133 + OPT_BOOL('i', NULL, &opts.index_only,
134 + N_("don't check the working tree after merging")),
135 OPT__DRY_RUN(&opts.dry_run, N_("don't update the index or the work tree")),
136 - OPT_SET_INT(0, "no-sparse-checkout", &opts.skip_sparse_checkout,
137 - N_("skip applying sparse checkout filter"), 1),
138 - OPT_SET_INT(0, "debug-unpack", &opts.debug_unpack,
139 - N_("debug unpack-trees"), 1),
136 + OPT_BOOL(0, "no-sparse-checkout", &opts.skip_sparse_checkout,
137 + N_("skip applying sparse checkout filter")),
138 + OPT_BOOL(0, "debug-unpack", &opts.debug_unpack,
139 + N_("debug unpack-trees")),
140 OPT_END()
141 };
142