From: Fernando Ramos <greenfoo@u92.eu>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: kawarimidoll <kawarimidoll+git@gmail.com>,
git@vger.kernel.org,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: Re: mergetool.vimdiff.layout behavior differs from documentation
Date: Mon, 24 Mar 2025 23:51:56 +0100 [thread overview]
Message-ID: <Z-HiDODocZftrtgL@x395.localdomain> (raw)
In-Reply-To: <CALnO6CD=ghMyWm6s8u3=iH4neRMWnTTAQWUAokcgM1HOBqNC6A@mail.gmail.com>
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!
prev parent reply other threads:[~2025-03-24 22:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 14:52 mergetool.vimdiff.layout behavior differs from documentation kawarimidoll
2025-03-24 20:35 ` D. Ben Knoble
2025-03-24 22:51 ` Fernando Ramos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-HiDODocZftrtgL@x395.localdomain \
--to=greenfoo@u92.eu \
--cc=ben.knoble@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=kawarimidoll+git@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).