From: Pini Reznik <pinir@expand.com>
To: git@vger.kernel.org
Cc: Pini Reznik <pinir@expand.com>
Subject: [PATCH] Open external merge tool with original file extensions in all three files
Date: Mon, 3 Dec 2007 17:31:14 +0200 [thread overview]
Message-ID: <1196695874-22567-1-git-send-email-pinir@expand.com> (raw)
This required to be able to use syntax highlighting in meld during conflicts resolution.
Before this change, two merged versions of file with a conflict were open with temporal extensions .LOCAL.$$ and REMOTE.$$
This way they were not recognized as a code files.
Signed-off-by: Pini Reznik <pinir@expand.com>
---
git-mergetool.sh | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 5587c5e..4c15d22 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.$$"
+ extension=`echo $path | awk -F \. '{print $NF}'`
+ BACKUP="$path.BACKUP.$$.${extension}"
+ LOCAL="$path.LOCAL.$$.${extension}"
+ REMOTE="$path.REMOTE.$$.${extension}"
+ BASE="$path.BASE.$$.${extension}"
mv -- "$path" "$BACKUP"
cp -- "$BACKUP" "$path"
--
1.5.3.5
next reply other threads:[~2007-12-03 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 15:31 Pini Reznik [this message]
2007-12-03 18:17 ` [PATCH] Open external merge tool with original file extensions in all three files Junio C Hamano
2007-12-03 21:28 ` Junio C Hamano
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=1196695874-22567-1-git-send-email-pinir@expand.com \
--to=pinir@expand.com \
--cc=git@vger.kernel.org \
/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).