Re: mergetool.vimdiff.layout behavior differs from documentation

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

 



On 25/03/24 04:35PM, D. Ben Knoble wrote:
> I've CC'd the author of most of that mergetool for some help, but the
> issue is likely here (lines 298–310 of the script mergetools/vimdiff
> on 683c54c999 (Git 2.49, 2025-03-14)):
> 
> # Search for a "@" in one of the files identifiers ("LOCAL", "BASE",
> # "REMOTE", "MERGED"). If not found, use "MERGE" as the default file
> # where changes will be saved.
> 
> if echo "$LAYOUT" | grep @LOCAL >/dev/null
> then
> FINAL_TARGET="LOCAL"
> elif echo "$LAYOUT" | grep @BASE >/dev/null
> then
> FINAL_TARGET="BASE"
> else
> FINAL_TARGET="MERGED"
> fi

You are completely right. This is a bug which can probably be fixed by simply
adding one extra "elif":

   if echo "$LAYOUT" | grep @LOCAL >/dev/null
   then
   FINAL_TARGET="LOCAL"
   elif echo "$LAYOUT" | grep @BASE >/dev/null
   then
   FINAL_TARGET="BASE"
  +elif echo "$LAYOUT" | grep @REMOTE >/dev/null
  +then
  +FINAL_TARGET="REMOTE"
   else
   FINAL_TARGET="MERGED"
   fi
    
If you can test it and prepare a patch, that would be great. Otherwise I will
try to do it myself in a few days.

Thanks!




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux