All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mergetool-lib: combine vimdiff and gvimdiff run blocks
@ 2010-09-15  2:21 Dan McGee
  2010-09-15  2:21 ` [PATCH 2/2] mergetool-lib: add a three-way diff view for vim/gvim Dan McGee
  0 siblings, 1 reply; 10+ messages in thread
From: Dan McGee @ 2010-09-15  2:21 UTC (permalink / raw)
  To: git; +Cc: Markus Heidelberg, David Aguilar, Charles Bailey, Dan McGee

They are nearly identical outside of the foreground flag, which can safely
be passed to both vim and gvim. The merge tool itself is named in
$merge_tool_path.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 git-mergetool--lib.sh |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index b5e1943..f9a51ba 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -169,25 +169,14 @@ run_merge_tool () {
 			"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
 		fi
 		;;
-	vimdiff)
-		if merge_mode; then
-			touch "$BACKUP"
-			"$merge_tool_path" -d -c "wincmd l" \
-				"$LOCAL" "$MERGED" "$REMOTE"
-			check_unchanged
-		else
-			"$merge_tool_path" -d -c "wincmd l" \
-				"$LOCAL" "$REMOTE"
-		fi
-		;;
-	gvimdiff)
+	vimdiff|gvimdiff)
 		if merge_mode; then
 			touch "$BACKUP"
-			"$merge_tool_path" -d -c "wincmd l" -f \
+			"$merge_tool_path" -f -d -c "wincmd l" \
 				"$LOCAL" "$MERGED" "$REMOTE"
 			check_unchanged
 		else
-			"$merge_tool_path" -d -c "wincmd l" -f \
+			"$merge_tool_path" -f -d -c "wincmd l" \
 				"$LOCAL" "$REMOTE"
 		fi
 		;;
-- 
1.7.2.3

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

end of thread, other threads:[~2010-09-27 15:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-15  2:21 [PATCH 1/2] mergetool-lib: combine vimdiff and gvimdiff run blocks Dan McGee
2010-09-15  2:21 ` [PATCH 2/2] mergetool-lib: add a three-way diff view for vim/gvim Dan McGee
2010-09-18  7:34   ` David Aguilar
2010-09-19  9:48     ` Felipe Contreras
2010-09-24 19:01       ` Dan McGee
2010-09-24 19:09         ` Jacob Helwig
2010-09-24 21:38           ` Jeff King
2010-09-25  3:17             ` David Aguilar
2010-09-27 15:19               ` Dan McGee
2010-09-24 21:31         ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.