From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Markus Heidelberg <markus.heidelberg@web.de>,
David Aguilar <davvid@gmail.com>,
Charles Bailey <charles@hashpling.org>,
Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH 1/2] mergetool-lib: combine vimdiff and gvimdiff run blocks
Date: Tue, 14 Sep 2010 21:21:42 -0500 [thread overview]
Message-ID: <1284517303-17244-1-git-send-email-dpmcgee@gmail.com> (raw)
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
next reply other threads:[~2010-09-15 2:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 2:21 Dan McGee [this message]
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
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=1284517303-17244-1-git-send-email-dpmcgee@gmail.com \
--to=dpmcgee@gmail.com \
--cc=charles@hashpling.org \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=markus.heidelberg@web.de \
/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 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.