Merge branch 'maint-1.9' into maint
[gitweb.git] / sequencer.c
index 2ee4f43035292381e979c539f033ade65848e1ac..bbaddcb05af3d720d8efd1d1d7c96ce1f9a35039 100644 (file)
@@ -154,7 +154,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
 static void free_message(struct commit *commit, struct commit_message *msg)
 {
        free(msg->parent_label);
-       logmsg_free(msg->message, commit);
+       unuse_commit_buffer(commit, msg->message);
 }
 
 static void write_cherry_pick_head(struct commit *commit, const char *pseudoref)
@@ -662,10 +662,12 @@ static int format_todo(struct strbuf *buf, struct commit_list *todo_list,
        int subject_len;
 
        for (cur = todo_list; cur; cur = cur->next) {
+               const char *commit_buffer = get_commit_buffer(cur->item, NULL);
                sha1_abbrev = find_unique_abbrev(cur->item->object.sha1, DEFAULT_ABBREV);
-               subject_len = find_commit_subject(cur->item->buffer, &subject);
+               subject_len = find_commit_subject(commit_buffer, &subject);
                strbuf_addf(buf, "%s %s %.*s\n", action_str, sha1_abbrev,
                        subject_len, subject);
+               unuse_commit_buffer(cur->item, commit_buffer);
        }
        return 0;
 }