return ret;
}
-static int checkout_fast_forward(unsigned char *head, unsigned char *remote)
+int checkout_fast_forward(const unsigned char *head, const unsigned char *remote)
{
struct tree *trees[MAX_UNPACK_TREES];
struct unpack_trees_options opts;
reset_hard(remote_head->sha1, 0);
return 0;
} else {
- struct strbuf msg = STRBUF_INIT;
+ struct strbuf merge_names = STRBUF_INIT;
/* We are invoked directly as the first-class UI. */
head_arg = "HEAD";
/*
* All the rest are the commits being merged;
* prepare the standard merge summary message to
- * be appended to the given message. If remote
+ * used as the merge message. If remote
* is invalid we will die later in the common
* codepath so we discard the error in this
* loop.
*/
if (!have_message) {
for (i = 0; i < argc; i++)
- merge_name(argv[i], &msg);
- fmt_merge_msg(option_log, &msg, &merge_msg);
+ merge_name(argv[i], &merge_names);
+ fmt_merge_msg(option_log, &merge_names, &merge_msg);
if (merge_msg.len)
strbuf_setlen(&merge_msg, merge_msg.len-1);
}