diff options
author | Dan McGee <dpmcgee@gmail.com> | 2010-09-14 21:21:42 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-15 10:14:15 -0700 |
commit | ae69fd0481fa7bb39ee9ee68dc2e009d500e3b1d (patch) | |
tree | 3669d03d893c745e1ac5792a040c1ff7d2f41961 /git-mergetool--lib.sh | |
parent | Merge branch 'maint' (diff) | |
download | tgif-ae69fd0481fa7bb39ee9ee68dc2e009d500e3b1d.tar.xz |
mergetool-lib: combine vimdiff and gvimdiff run blocks
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r-- | 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 b5e1943b1d..f9a51ba504 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 ;; |