From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: git@vger.kernel.org, Bert Wesarg <bert.wesarg@googlemail.com>
Subject: Re: [PATCH 2v2/2] git-gui: support for diff3 conflict style
Date: Thu, 20 Oct 2011 21:35:25 +0200 [thread overview]
Message-ID: <CAKPyHN2pOJfm=Ys+giv-4ERjzzje1VigxfEKKY-yPsE03A0NNA@mail.gmail.com> (raw)
In-Reply-To: <c761e522cce009a70d9131f0a5a1a2fc6aa6d9ac.1301469420.git.bert.wesarg@googlemail.com>
Ping.
On Wed, Mar 30, 2011 at 09:18, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> This adds highlight support for the diff3 conflict style.
>
> The common pre-image will be reversed to --, because it has been removed
> and either replaced with our or their side.
>
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
> ---
>
> Sorry, I had an syntax error in the last version.
>
> git-gui.sh | 3 +++
> lib/diff.tcl | 12 ++++++++++++
> 2 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/git-gui.sh b/git-gui.sh
> index d5c1535..6adcda6 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -3388,6 +3388,9 @@ $ui_diff tag conf d_s- \
> $ui_diff tag conf d< \
> -foreground orange \
> -font font_diffbold
> +$ui_diff tag conf d| \
> + -foreground orange \
> + -font font_diffbold
> $ui_diff tag conf d= \
> -foreground orange \
> -font font_diffbold
> diff --git a/lib/diff.tcl b/lib/diff.tcl
> index 39e4d90..caa4be7 100644
> --- a/lib/diff.tcl
> +++ b/lib/diff.tcl
> @@ -339,6 +339,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
> }
>
> set ::current_diff_inheader 1
> + set ::in_conflict_pre_image 0
> fconfigure $fd \
> -blocking 0 \
> -encoding [get_path_encoding $path] \
> @@ -439,10 +440,21 @@ proc read_diff {fd conflict_size cont_info} {
> {++} {
> set regexp [string map [list %conflict_size $conflict_size]\
> {^\+\+([<>=]){%conflict_size}(?: |$)}]
> + set regexp_pre_image [string map [list %conflict_size $conflict_size]\
> + {^\+\+\|{%conflict_size}(?: |$)}]
> if {[regexp $regexp $line _g op]} {
> set is_conflict_diff 1
> set line [string replace $line 0 1 { }]
> set tags d$op
> + set ::in_conflict_pre_image 0
> + } elseif {[regexp $regexp_pre_image $line]} {
> + set is_conflict_diff 1
> + set line [string replace $line 0 1 { }]
> + set tags d|
> + set ::in_conflict_pre_image 1
> + } elseif ($::in_conflict_pre_image) {
> + set line [string replace $line 0 1 {--}]
> + set tags d_--
> } else {
> set tags d_++
> }
> --
> 1.7.4.2.743.g539ab
>
>
next prev parent reply other threads:[~2011-10-20 19:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 7:49 [PATCH] git-gui: respect conflict marker size Bert Wesarg
2010-11-16 9:21 ` [PATCHv2 1/2] " Bert Wesarg
2010-11-16 9:26 ` [PATCH 2/2] git-gui: support for diff3 conflict style Bert Wesarg
2010-11-19 11:41 ` Pat Thoyts
2010-11-19 12:05 ` Bert Wesarg
2011-02-27 20:15 ` Bert Wesarg
2011-03-30 6:44 ` Bert Wesarg
2011-03-30 7:18 ` [PATCH 2v2/2] " Bert Wesarg
2011-10-20 19:35 ` Bert Wesarg [this message]
2010-11-19 11:20 ` [PATCHv2 1/2] git-gui: respect conflict marker size Pat Thoyts
2010-11-19 11:48 ` Bert Wesarg
-- strict thread matches above, loose matches on Subject: below --
2010-11-15 10:04 [PATCH] git-gui: support for underline styles Bert Wesarg
2010-11-19 10:00 ` Pat Thoyts
2010-11-19 10:55 ` Bert Wesarg
2011-02-27 20:04 ` Bert Wesarg
2011-03-30 6:44 ` [PATCH 1/2] " Bert Wesarg
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKPyHN2pOJfm=Ys+giv-4ERjzzje1VigxfEKKY-yPsE03A0NNA@mail.gmail.com' \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=patthoyts@users.sourceforge.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).