• J
    merge-file --diff3: add a label for ancestor · 4bb09362
    Jonathan Nieder 提交于
    git merge-file --diff3 can be used to present conflicts hunks
    including text from the common ancestor.
    
    The added information is helpful for resolving a merge by hand, and
    merge tools can usually grok it because it looks like output from
    diff3 -m.  However, ‘diff3’ includes a label for the merge base on the
    ||||||| line and some tools cannot parse conflict hunks without such a
    label.  Write the base-name as passed in a -L option (or the name of
    the ancestor file by default) on that line.
    
    git rerere will not have trouble parsing this output, since instead of
    looking for a newline, it looks for whitespace after the |||||||
    marker.  Since rerere includes its own code for recreating conflict
    hunks, conflict identifiers are unaffected.  No other code in git tries
    to parse conflict hunks.
    Requested-by: NStefan Monnier <monnier@iro.umontreal.ca>
    Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    4bb09362
t6023-merge-file.sh 6.3 KB