topts.src_index = &the_index;
topts.dst_index = &the_index;
- setup_unpack_trees_porcelain(topts.msgs, "checkout");
+ setup_unpack_trees_porcelain(&topts, "checkout");
refresh_cache(REFRESH_QUIET);
opts.merge = 1;
opts.fn = twoway_merge;
opts.show_all_errors = 1;
- setup_unpack_trees_porcelain(opts.msgs, "merge");
+ setup_unpack_trees_porcelain(&opts, "merge");
trees[nr_trees] = parse_tree_indirect(head);
if (!trees[nr_trees++])
opts.fn = threeway_merge;
opts.src_index = &the_index;
opts.dst_index = &the_index;
- setup_unpack_trees_porcelain(opts.msgs, "merge");
+ setup_unpack_trees_porcelain(&opts, "merge");
init_tree_desc_from_tree(t+0, common);
init_tree_desc_from_tree(t+1, head);
? ((o)->msgs[(type)]) \
: (unpack_plumbing_errors[(type)]) )
-void setup_unpack_trees_porcelain(const char **msgs, const char *cmd)
+void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
+ const char *cmd)
{
+ const char **msgs = opts->msgs;
const char *msg;
char *tmp;
const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
* Sets the list of user-friendly error messages to be used by the
* command "cmd" (either merge or checkout)
*/
-void setup_unpack_trees_porcelain(const char **msgs, const char *cmd);
+void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
+ const char *cmd);
struct rejected_paths_list {
char *path;