I started this whole patch series when I did a git rebase, and was too lazy to resolve a conflict and just added the file with the conflict markers and continued. Once I got nested conflicts in the file, I decided to abort the rebase with 'git rebase --abort' and got a segfault in 'git rerere clear'. Even if we can't handle the conflict, we shouldn't end with crashing 'git rerere clear'. While trying to understand how 'git rerere' works internally I noticed some other improvements that could be made, such as marking the strings for translation and adding some docs on how rerere works, since I had to find out from the code, and reading some documentation would definitely have been helpful. The next patches are more related to the actual problem I encountered, first fixing the the possible crashing of 'git rerere clear' when we can't handle conflicts in a file, and then actually trying to handle nested conflicts. I don't know if it's actually worth trying to handle nested conflicts, as they are more than likely a very rare use-case, but on the other hand resolving such conflicts is especially painful, so only having to do it once would be much nicer. This whole patch series is marked as RFC/PATCH, as this is my first time touching the rerere code, so I may well misunderstand some bits of the code. Thomas Gummerer (7): rerere: unify error message when read_cache fails rerere: mark strings for translation rerere: add some documentation rerere: fix crash when conflict goes unresolved rerere: only return whether a path has conflicts or not rerere: factor out handle_conflict function rerere: teach rerere to handle nested conflicts Documentation/technical/rerere.txt | 43 +++++ rerere.c | 244 ++++++++++++++--------------- t/t4200-rerere.sh | 25 +++ 3 files changed, 186 insertions(+), 126 deletions(-) create mode 100644 Documentation/technical/rerere.txt -- 2.17.0.588.g4d217cdf8e.dirty