git-commit-vandalism/Documentation/technical
Thomas Gummerer 4af32207bc rerere: teach rerere to handle nested conflicts
Currently rerere can't handle nested conflicts and will error out when
it encounters such conflicts.  Do that by recursively calling the
'handle_conflict' function to normalize the conflict.

Note that a conflict like this would only be produced if a user
commits a file with conflict markers, and gets a conflict including
that in a susbsequent operation.

The conflict ID calculation here deserves some explanation:

As we are using the same handle_conflict function, the nested conflict
is normalized the same way as for non-nested conflicts, which means
the ancestor in the diff3 case is stripped out, and the parts of the
conflict are ordered alphabetically.

The conflict ID is however is only calculated in the top level
handle_conflict call, so it will include the markers that 'rerere'
adds to the output.  e.g. say there's the following conflict:

    <<<<<<< HEAD
    1
    =======
    <<<<<<< HEAD
    3
    =======
    2
    >>>>>>> branch-2
    >>>>>>> branch-3~

it would be recorde as follows in the preimage:

    <<<<<<<
    1
    =======
    <<<<<<<
    2
    =======
    3
    >>>>>>>
    >>>>>>>

and the conflict ID would be calculated as

    sha1(1<NUL><<<<<<<
    2
    =======
    3
    >>>>>>><NUL>)

Stripping out vs. leaving the conflict markers in place in the inner
conflict should have no practical impact, but it simplifies the
implementation.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-06 13:22:35 -07:00
..
.gitignore
api-allocation-growing.txt add macro REALLOC_ARRAY 2014-09-18 09:13:38 -07:00
api-argv-array.txt api-argv-array.txt: remove broken link to string-list API 2017-10-06 21:16:03 +09:00
api-config.txt doc: fix config API documentation about config_with_options 2018-05-11 10:26:33 +09:00
api-credentials.txt Documentation: fix linkgit references 2016-05-09 15:44:14 -07:00
api-diff.txt
api-directory-listing.txt Documentation: fix several one-character-off spelling errors 2018-04-09 14:15:02 +09:00
api-error-handling.txt api-error-handling doc: typofix 2015-03-28 09:24:55 -07:00
api-gitattributes.txt attr: retire git_check_attrs() API 2017-02-01 13:46:52 -08:00
api-grep.txt
api-history-graph.txt
api-index-skel.txt
api-index.sh
api-merge.txt
api-object-access.txt sha1_file.c: rename to use dash in file name 2018-04-11 18:11:00 +09:00
api-oid-array.txt get_short_oid: sort ambiguous objects by type, then SHA-1 2018-05-11 14:43:23 +09:00
api-parse-options.txt timestamp_t: a new data type for timestamps 2017-04-27 13:07:39 +09:00
api-quote.txt
api-ref-iteration.txt refs: remove dead for_each_*_submodule() 2017-08-24 14:56:28 -07:00
api-remote.txt http: allow selection of proxy authentication method 2016-01-26 10:53:09 -08:00
api-revision-walking.txt
api-run-command.txt run-command: factor out child_process_clear() 2015-11-02 15:01:00 -08:00
api-setup.txt pathspec: remove the deprecated get_pathspec function 2017-01-08 18:04:17 -08:00
api-sigchain.txt
api-submodule-config.txt Merge branch 'sb/submodule-move-nested' 2018-05-08 15:59:17 +09:00
api-trace.txt Merge branch 'ep/trace-doc-sample-fix' into maint 2016-04-29 14:16:00 -07:00
api-tree-walking.txt tree-walk: convert fill_tree_descriptor() to object_id 2017-08-14 12:38:54 -07:00
api-xdiff-interface.txt
bitmap-format.txt pack-bitmap: implement optional name_hash cache 2013-12-30 12:19:23 -08:00
commit-graph-format.txt commit-graph: add format document 2018-04-02 14:27:31 -07:00
commit-graph.txt commit-graph.txt: update design document 2018-05-22 12:36:34 +09:00
hash-function-transition.txt doc hash-function-transition: clarify what SHAttered means 2018-03-27 19:08:31 -07:00
http-protocol.txt smart-http: document flush after "# service" line 2018-03-05 11:05:19 -08:00
index-format.txt fsmonitor: add documentation for the fsmonitor extension. 2017-10-01 17:23:05 +09:00
long-running-process-protocol.txt Docs: split out long-running subprocess handshake 2018-01-25 11:24:32 -08:00
pack-format.txt pack-format.txt: more details on pack file format 2018-05-13 10:20:03 +09:00
pack-heuristics.txt pack-heuristics.txt: mark up the file header properly 2014-01-13 11:18:34 -08:00
pack-protocol.txt Merge branch 'jh/partial-clone' 2018-02-13 13:39:04 -08:00
partial-clone.txt partial-clone: design doc 2017-12-14 13:10:57 -08:00
protocol-capabilities.txt upload-pack: add object filtering for partial clone 2017-12-08 09:58:51 -08:00
protocol-common.txt Merge branch 'ls/packet-line-protocol-doc-fix' 2016-08-31 10:03:51 -07:00
protocol-v2.txt Merge branch 'jt/partial-clone-proto-v2' 2018-05-30 14:04:10 +09:00
racy-git.txt Makefile / racy-git.txt: clarify USE_NSEC prerequisites 2015-07-01 14:54:42 -07:00
repository-version.txt extension.partialclone: introduce partial clone extension 2017-12-05 09:46:05 -08:00
rerere.txt rerere: teach rerere to handle nested conflicts 2018-08-06 13:22:35 -07:00
send-pack-pipeline.txt
shallow.txt technical/shallow: describe why shallow cannot use replace refs 2018-04-30 11:12:31 +09:00
signature-format.txt Documentation/technical: signed merge tag format 2016-06-17 12:10:48 -07:00
trivial-merge.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00