Merge branch 'jh/libify-note-handling'

Make it possible to call into copy-notes API from the sequencer code.

* jh/libify-note-handling:
  Move create_notes_commit() from notes-merge.c into notes-utils.c
  Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
  finish_copy_notes_for_rewrite(): Let caller provide commit message
This commit is contained in:
Junio C Hamano
2013-06-24 13:48:30 -07:00
8 changed files with 203 additions and 189 deletions

View File

@ -29,6 +29,7 @@
#include "gpg-interface.h"
#include "column.h"
#include "sequencer.h"
#include "notes-utils.h"
static const char * const builtin_commit_usage[] = {
N_("git commit [options] [--] <pathspec>..."),
@ -1593,7 +1594,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (cfg) {
/* we are amending, so current_head is not NULL */
copy_note_for_rewrite(cfg, current_head->object.sha1, sha1);
finish_copy_notes_for_rewrite(cfg);
finish_copy_notes_for_rewrite(cfg, "Notes added by 'git commit --amend'");
}
run_rewrite_hook(current_head->object.sha1, sha1);
}