git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Open external merge tool with original file extensions for all three files
@ 2007-12-06  7:06 Pini Reznik
  0 siblings, 0 replies; 3+ messages in thread
From: Pini Reznik @ 2007-12-06  7:06 UTC (permalink / raw)
  To: git; +Cc: Pini Reznik

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>
---
 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"
 
     mv -- "$path" "$BACKUP"
     cp -- "$BACKUP" "$path"
-- 
1.5.3.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] Open external merge tool with original file extensions for all three files
@ 2007-12-05  7:19 Pini Reznik
  2007-12-05  7:24 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Pini Reznik @ 2007-12-05  7:19 UTC (permalink / raw)
  To: git; +Cc: Pini Reznik

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>
---
 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"
 
     mv -- "$path" "$BACKUP"
     cp -- "$BACKUP" "$path"
-- 
1.5.3.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-06  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06  7:06 [PATCH] Open external merge tool with original file extensions for all three files Pini Reznik
  -- strict thread matches above, loose matches on Subject: below --
2007-12-05  7:19 Pini Reznik
2007-12-05  7:24 ` Junio C Hamano

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).