git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pini Reznik <pinir@expand.com>
Cc: git@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH] Open external merge tool with original file extensions for all three files
Date: Tue, 04 Dec 2007 23:24:27 -0800	[thread overview]
Message-ID: <7vve7dzjro.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1196839153-31084-1-git-send-email-pinir@expand.com> (Pini Reznik's message of "Wed, 5 Dec 2007 09:19:13 +0200")

Pini Reznik <pinir@expand.com> writes:

> Before this fix conflicted files were open in external merge tool with temporal extensions like REMOTE.$$ and LOCAL.$$.
> This way meld was unable to recognize these files and syntax highlighting feature was unusable.
>
>
> Signed-off-by: Pini Reznik <pinir@expand.com>

I have to wonder if it is fashionable to use overlooooong lines on this
list today...  Please linewrap commit log message.

Ted, you added meld from the beginning to git-mergetool.  Does the patch
look good?

> ---
>  git-mergetool.sh |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/git-mergetool.sh b/git-mergetool.sh
> index 5587c5e..2f31fa2 100755
> --- a/git-mergetool.sh
> +++ b/git-mergetool.sh
> @@ -152,10 +152,11 @@ merge_file () {
>  	exit 1
>      fi
>  
> -    BACKUP="$path.BACKUP.$$"
> -    LOCAL="$path.LOCAL.$$"
> -    REMOTE="$path.REMOTE.$$"
> -    BASE="$path.BASE.$$"
> +    ext="$$$(expr "$path" : '.*\(\.[^/]*\)$')"
> +    BACKUP="$path.BACKUP.$ext"
> +    LOCAL="$path.LOCAL.$ext"
> +    REMOTE="$path.REMOTE.$ext"
> +    BASE="$path.BASE.$ext"

I realize '.*\(\.[^./]*\)$' might have been better, as the above
expression as written will slurp ".b.c" as ext from "foo.b.c", but
probably for "merger knows the file type with file extension" purpose,
it does not make a difference.

  reply	other threads:[~2007-12-05  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  7:19 [PATCH] Open external merge tool with original file extensions for all three files Pini Reznik
2007-12-05  7:24 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-06  7:06 Pini Reznik

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=7vve7dzjro.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pinir@expand.com \
    --cc=tytso@mit.edu \
    /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).