path: root/Documentation/technical/rerere.txt
AgeCommit message (Collapse)Author
2019-11-07Documentation: fix a bunch of typos, both old and newElijah Newren
Reported-by: Jens Schleusener <> Signed-off-by: Elijah Newren <> Signed-off-by: Junio C Hamano <>
2018-08-29rerere: mention caveat about unmatched conflict markersThomas Gummerer
4af3220 ("rerere: teach rerere to handle nested conflicts", 2018-08-05) introduced slightly better behaviour if the user commits conflict markers and then gets another conflict in 'git rerere'. However this is just a heuristic to punt on such conflicts better, and doesn't deal with any unmatched conflict markers. Make that clearer in the documentation. Suggested-by: Junio C Hamano <> Signed-off-by: Thomas Gummerer <> Signed-off-by: Junio C Hamano <>
2018-08-06rerere: teach rerere to handle nested conflictsThomas Gummerer
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 <> Signed-off-by: Junio C Hamano <>
2018-08-06rerere: add documentation for conflict normalizationThomas Gummerer
Add some documentation for the logic behind the conflict normalization in rerere. Helped-by: Junio C Hamano <> Signed-off-by: Thomas Gummerer <> Signed-off-by: Junio C Hamano <>