sha1_to_hex(commit->object.sha1));
}
+static void advise(const char *advice, ...)
+{
+ va_list params;
+
+ va_start(params, advice);
+ vreportf("hint: ", advice, params);
+ va_end(params);
+}
+
static char *help_msg(void)
{
struct strbuf helpbuf = STRBUF_INIT;
}
}
- strbuf_addstr(&mebuf, me);
+ strbuf_addf(&mebuf, "%s of commit %s", me,
+ find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
if (!strategy || !strcmp(strategy, "recursive") || action == REVERT) {
res = do_recursive_merge(base, next, base_label, next_label,
mebuf.buf, help_msg());
rerere(allow_rerere_auto);
} else {
- fprintf(stderr, "Finished one %s.\n", mebuf.buf);
+ if (!no_commit)
+ res = run_git_commit(defmsg);
}
strbuf_release(&mebuf);
free_message(&msg);
-
- if (res)
- return 1;
-
- if (!no_commit) {
- res = run_git_commit(defmsg);
- free(defmsg);
- return res;
- }
-
free(defmsg);
- return 0;
+ return res;
}
static void prepare_revs(struct rev_info *revs)