bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] git-merge-changelog: fix conflict markers


From: Bruno Haible
Subject: Re: [PATCH] git-merge-changelog: fix conflict markers
Date: Mon, 24 Jun 2024 13:18:46 +0200

Hi Andreas,

Your chances would be higher for a patch to be applied if you gave a
rationale / justification, and if the patch contained comments.

I did my own research and found a rationale — possibly different from
yours. So I added your patch, and this followup. Also, I changed the
words "fix" and "missing" from your ChangeLog entry, since I am not
aware of a formal standard that specifies how a conflict marker should
look like. Again, if you have different knowledge, please share it.


2024-06-24  Bruno Haible  <bruno@clisp.org>

        git-merge-changelog: Improve last commit.
        * lib/git-merge-changelog.c (conflict_write): Add comments.

diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c
index b30045e2aa..3cffe1fd2f 100644
--- a/lib/git-merge-changelog.c
+++ b/lib/git-merge-changelog.c
@@ -962,6 +962,9 @@ conflict_write (FILE *fp, struct conflict *c)
   idx_t i;
 
   /* Use the same syntax as git's default merge driver.
+     The spaces after <<<<<<< and >>>>>>> are for compatibility with
+     git/rerere.c, function 'is_cmarker'.  Usually they would be followed by
+     branch or version names, but this info is not available to us here.
      Don't indent the contents of the entries (with things like ">" or "-"),
      otherwise the user needs more textual editing to resolve the conflict.  */
   fputs ("<<<<<<< \n", fp);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]