• J
    checkout -m --conflict=diff3: add a label for ancestor · c4151629
    Jonathan Nieder 提交于
    git checkout --merge --conflict=diff3 can be used to present conflict
    hunks including text from the common ancestor.  The added information
    is helpful for resolving a merge by hand, and merge tools tend to
    understand it because it is very similar to what ‘diff3 -m’ produces.
    
    Unlike current git, diff3 -m includes a label for the merge base on
    the ||||||| line, and unfortunately, some tools cannot parse the
    conflict hunks without it.  Humans can benefit from a cue when
    learning to interpreting the format, too.  Mark the start of the text
    from the old branch with a label based on the branch’s name.
    
    git rerere does not have trouble parsing this output and its preimage
    ids are unchanged since it includes its own code for recreating
    conflict hunks.  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>
    c4151629
t7201-co.sh 14.9 KB