From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
Tanguy Ortolo <tanguy+debian@ortolo.eu>,
Charles Bailey <charles@hashpling.org>,
Sebastian Schuberth <sschuberth@gmail.com>
Subject: [PATCH 1/4] difftool--helper: Make style consistent with git
Date: Thu, 18 Aug 2011 00:23:44 -0700 [thread overview]
Message-ID: <1313652227-48545-2-git-send-email-davvid@gmail.com> (raw)
In-Reply-To: <1313652227-48545-1-git-send-email-davvid@gmail.com>
Use the predominant conditional style where "then" appears
alone on the line after the test expression.
Signed-off-by: David Aguilar <davvid@gmail.com>
---
git-difftool--helper.sh | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 0594bf7..8452890 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -13,7 +13,8 @@ TOOL_MODE=diff
should_prompt () {
prompt_merge=$(git config --bool mergetool.prompt || echo true)
prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
- if test "$prompt" = true; then
+ if test "$prompt" = true
+ then
test -z "$GIT_DIFFTOOL_NO_PROMPT"
else
test -n "$GIT_DIFFTOOL_PROMPT"
@@ -37,9 +38,11 @@ launch_merge_tool () {
# $LOCAL and $REMOTE are temporary files so prompt
# the user with the real $MERGED name before launching $merge_tool.
- if should_prompt; then
+ if should_prompt
+ then
printf "\nViewing: '$MERGED'\n"
- if use_ext_cmd; then
+ if use_ext_cmd
+ then
printf "Hit return to launch '%s': " \
"$GIT_DIFFTOOL_EXTCMD"
else
@@ -48,7 +51,8 @@ launch_merge_tool () {
read ans
fi
- if use_ext_cmd; then
+ if use_ext_cmd
+ then
export BASE
eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
else
@@ -56,8 +60,10 @@ launch_merge_tool () {
fi
}
-if ! use_ext_cmd; then
- if test -n "$GIT_DIFF_TOOL"; then
+if ! use_ext_cmd
+then
+ if test -n "$GIT_DIFF_TOOL"
+ then
merge_tool="$GIT_DIFF_TOOL"
else
merge_tool="$(get_merge_tool)" || exit
--
1.7.6.476.g57292
next prev parent reply other threads:[~2011-08-18 7:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 7:23 [PATCH 0/4] Refactor git-mergetool--lib.sh David Aguilar
2011-08-18 7:23 ` David Aguilar [this message]
2011-08-18 7:49 ` [PATCH 1/4] difftool--helper: Make style consistent with git Sebastian Schuberth
2011-08-18 9:08 ` David Aguilar
2011-08-18 17:31 ` Junio C Hamano
2011-08-18 7:23 ` [PATCH 2/4] mergetool--lib: " David Aguilar
2011-08-18 7:23 ` [PATCH 3/4] mergetool--lib: Refactor tools into separate files David Aguilar
2011-10-09 9:17 ` [PATCH da/difftool-mergtool-refactor] Makefile: fix permissions of mergetools/ checked out with permissive umask Jonathan Nieder
2011-10-09 11:43 ` Jonathan Nieder
2011-10-09 18:26 ` David Aguilar
2011-10-09 21:47 ` Jonathan Nieder
2011-10-11 0:00 ` Junio C Hamano
2011-08-18 7:23 ` [PATCH 4/4] mergetools/meld: Use '--output' when available David Aguilar
2011-08-18 8:13 ` Jonathan Nieder
2011-08-18 9:24 ` David Aguilar
2011-08-19 9:14 ` [PATCH v2 " David Aguilar
2011-08-19 22:58 ` Junio C Hamano
2011-08-18 7:57 ` [PATCH 0/4] Refactor git-mergetool--lib.sh Sebastian Schuberth
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=1313652227-48545-2-git-send-email-davvid@gmail.com \
--to=davvid@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=sschuberth@gmail.com \
--cc=tanguy+debian@ortolo.eu \
/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.