git/builtin
Johan Herland 3228e67120 git notes merge: Add automatic conflict resolvers (ours, theirs, union)
The new -s/--strategy command-line option to 'git notes merge' allow the user
to choose how notes merge conflicts should be resolved. There are four valid
strategies to choose from:

1. "manual" (the default): This will let the user manually resolve conflicts.
   This option currently fails with an error message. It will be implemented
   properly in future patches.

2. "ours": This automatically chooses the local version of a conflict, and
   discards the remote version.

3. "theirs": This automatically chooses the remote version of a conflict, and
   discards the local version.

4. "union": This automatically resolves the conflict by appending the remote
   version to the local version.

The strategies are implemented using the combine_notes_* functions from the
notes.h API.

The patch also includes testcases verifying the correct implementation of
these strategies.

This patch has been improved by the following contributions:
- Jonathan Nieder: Future-proof by always checking add_note() return value
- Stephen Boyd: Use test_commit
- Stephen Boyd: Use correct option name

Thanks-to: Jonathan Nieder <jrnieder@gmail.com>
Thanks-to: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-17 13:21:58 -08:00
..
add.c git add: Add the "--ignore-missing" option for the dry run 2010-07-12 15:13:54 -07:00
annotate.c
apply.c Merge branch 'jp/string-list-api-cleanup' 2010-06-30 11:55:38 -07:00
archive.c
bisect--helper.c
blame.c Merge branch 'cp/textconv-cat-file' 2010-06-27 12:07:55 -07:00
branch.c Merge branch 'sm/branch-broken-ref' 2010-06-21 06:02:47 -07:00
bundle.c
cat-file.c Merge branch 'cp/textconv-cat-file' 2010-06-27 12:07:55 -07:00
check-attr.c
check-ref-format.c Allow "check-ref-format --branch" from subdirectory 2010-08-06 10:01:45 -07:00
checkout-index.c
checkout.c Merge branch 'gv/portable' 2010-06-21 06:02:44 -07:00
clean.c
clone.c Merge branch 'ph/clone-message-reword' 2010-06-18 11:16:53 -07:00
commit-tree.c make commit_tree a library function 2010-04-01 23:53:54 -07:00
commit.c commit: remove full stop from usage help for -u 2010-07-27 09:44:17 -07:00
config.c Allow passing of configuration parameters in the command line 2010-03-28 09:48:25 -07:00
count-objects.c
describe.c Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint 2010-06-16 16:21:15 -07:00
diff-files.c
diff-index.c
diff-tree.c Merge branch 'pb/log-first-parent-p-m' 2010-03-24 16:25:39 -07:00
diff.c Merge branch 'jc/diff-merge-base-multi' 2010-07-16 15:45:35 -07:00
fast-export.c string_list: Fix argument order for string_list_append 2010-06-27 10:06:52 -07:00
fetch-pack.c
fetch.c Clarify help message when no remote is specified in fetch/pull. 2010-07-27 09:12:23 -07:00
fmt-merge-msg.c Merge branch 'jp/string-list-api-cleanup' 2010-06-30 11:55:38 -07:00
for-each-ref.c Merge branch 'maint' 2010-06-07 22:15:31 -07:00
fsck.c
gc.c
grep.c Merge branch 'jn/grep-open' 2010-07-15 12:07:18 -07:00
hash-object.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
help.c Cast execl*() NULL sentinels to (char *) 2010-07-25 23:14:18 -07:00
index-pack.c Merge branch 'np/index-pack-memsave' into maint 2010-06-16 16:22:23 -07:00
init-db.c handle "git --bare init <dir>" properly 2010-05-10 11:25:37 -07:00
log.c Merge branch 'ar/decorate-color' 2010-06-30 11:55:40 -07:00
ls-files.c Merge branch 'jp/string-list-api-cleanup' 2010-06-30 11:55:38 -07:00
ls-remote.c ls-remote: print URL when no repo is specified 2010-05-11 22:55:44 -07:00
ls-tree.c ls: remove redundant logic 2010-03-21 16:23:44 -07:00
mailinfo.c enums: omit trailing comma for portability 2010-05-31 16:59:27 -07:00
mailsplit.c string_list: Fix argument order for string_list_insert 2010-06-27 10:06:51 -07:00
merge-base.c
merge-file.c Merge branch 'rs/diff-no-minimal' into maint 2010-06-21 05:38:50 -07:00
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c merge-tree: fix where two branches share no changes 2010-07-14 12:56:49 -07:00
merge.c Merge branch 'tc/merge-m-log' 2010-06-18 11:16:54 -07:00
mktag.c
mktree.c
mv.c string_list: Fix argument order for string_list_insert 2010-06-27 10:06:51 -07:00
name-rev.c
notes.c git notes merge: Add automatic conflict resolvers (ours, theirs, union) 2010-11-17 13:21:58 -08:00
pack-objects.c Merge branch 'np/malloc-threading' into maint 2010-06-16 16:21:06 -07:00
pack-redundant.c
pack-refs.c
patch-id.c patch-id: Add support for mbox format 2010-04-19 13:01:49 -07:00
prune-packed.c
prune.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
push.c Merge branch 'maint' 2010-04-09 22:43:18 -07:00
read-tree.c Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fix 2010-07-08 18:55:50 -07:00
receive-pack.c Merge branch 'tr/receive-pack-aliased-update-fix' into maint 2010-07-07 10:25:15 -07:00
reflog.c Merge branch 'jc/maint-no-reflog-expire-unreach-for-head' 2010-05-21 04:02:18 -07:00
remote.c Merge branch 'jp/string-list-api-cleanup' 2010-06-30 11:55:38 -07:00
replace.c
rerere.c Merge branch 'js/merge-rr-fix' 2010-07-15 12:08:36 -07:00
reset.c Sync with 1.7.0.4 2010-03-31 15:14:27 -07:00
rev-list.c rev-list: introduce --count option 2010-06-12 09:39:06 -07:00
rev-parse.c Merge branch 'maint' 2010-07-07 11:18:26 -07:00
revert.c revert: do not rebuild argv on heap 2010-06-29 10:36:13 -07:00
rm.c
send-pack.c Merge branch 'ld/push-porcelain' 2010-03-15 00:58:24 -07:00
shortlog.c string_list: Fix argument order for string_list_append 2010-06-27 10:06:52 -07:00
show-branch.c show-branch: use DEFAULT_ABBREV instead of 7 2010-05-25 09:48:49 -07:00
show-ref.c string_list: Fix argument order for string_list_insert 2010-06-27 10:06:51 -07:00
stripspace.c
symbolic-ref.c
tag.c tag -v: use RUN_GIT_CMD to run verify-tag 2010-04-17 12:40:19 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
verify-pack.c
verify-tag.c
write-tree.c