From: Junio C Hamano Date: Thu, 25 Nov 2010 00:00:33 +0000 (-0800) Subject: Merge branch 'jh/notes-merge' into next X-Git-Tag: ko-next~124 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6218115d2834d1b6f836754923497e5640302547;p=git.git Merge branch 'jh/notes-merge' into next * jh/notes-merge: (23 commits) Provide 'git merge --abort' as a synonym to 'git reset --merge' cmd_merge(): Parse options before checking MERGE_HEAD Provide 'git notes get-ref' to easily retrieve current notes ref git notes merge: Add testcases for merging notes trees at different fanouts git notes merge: Add another auto-resolving strategy: "cat_sort_uniq" git notes merge: --commit should fail if underlying notes ref has moved git notes merge: List conflicting notes in notes merge commit message git notes merge: Manual conflict resolution, part 2/2 git notes merge: Manual conflict resolution, part 1/2 Documentation: Preliminary docs on 'git notes merge' git notes merge: Add automatic conflict resolvers (ours, theirs, union) git notes merge: Handle real, non-conflicting notes merges builtin/notes.c: Refactor creation of notes commits. git notes merge: Initial implementation handling trivial merges only builtin/notes.c: Split notes ref DWIMmery into a separate function notes.c: Use two newlines (instead of one) when concatenating notes (trivial) t3303: Indent with tabs instead of spaces for consistency notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond notes.h/c: Allow combine_notes functions to remove notes notes.c: Reorder functions in preparation for next commit ... Conflicts: builtin.h --- 6218115d2834d1b6f836754923497e5640302547 diff --cc builtin.h index 5d97009e3,908d85064..904e067a8 --- a/builtin.h +++ b/builtin.h @@@ -13,10 -11,13 +13,10 @@@ extern const char git_version_string[] extern const char git_usage_string[]; extern const char git_more_info_string[]; -extern void list_common_cmds_help(void); -extern const char *help_unknown_cmd(const char *cmd); extern void prune_packed_objects(int); -extern int fmt_merge_msg(int merge_summary, struct strbuf *in, - struct strbuf *out); -extern int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out); +extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out, + int merge_title, int shortlog_len); - extern int commit_notes(struct notes_tree *t, const char *msg); + extern void commit_notes(struct notes_tree *t, const char *msg); struct notes_rewrite_cfg { struct notes_tree **trees; diff --cc builtin/merge.c index c24a7be02,0539f7c91..3921cd304 --- a/builtin/merge.c +++ b/builtin/merge.c @@@ -54,9 -54,9 +54,10 @@@ static size_t use_strategies_nr, use_st static const char **xopts; static size_t xopts_nr, xopts_alloc; static const char *branch; +static int option_renormalize; static int verbosity; static int allow_rerere_auto; + static int abort_current_merge; static struct strategy all_strategy[] = { { "recursive", DEFAULT_TWOHEAD | NO_TRIVIAL }, diff --cc notes.c index 70d00135e,96cde4213..a013c1bc6 --- a/notes.c +++ b/notes.c @@@ -1003,10 -1106,10 +1091,10 @@@ int add_note(struct notes_tree *t, cons l = (struct leaf_node *) xmalloc(sizeof(struct leaf_node)); hashcpy(l->key_sha1, object_sha1); hashcpy(l->val_sha1, note_sha1); - note_tree_insert(t, t->root, 0, l, PTR_TYPE_NOTE, combine_notes); + return note_tree_insert(t, t->root, 0, l, PTR_TYPE_NOTE, combine_notes); } -void remove_note(struct notes_tree *t, const unsigned char *object_sha1) +int remove_note(struct notes_tree *t, const unsigned char *object_sha1) { struct leaf_node l;