summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Adam <adam@sigterm.info>2014-03-10 01:32:01 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-03-24 12:43:07 -0700
commit9fe0cf3a5ee01ebe0c323789cce3916b443980dc (patch)
treef3300a098a05c009bb046525becede762ae35410
parentStart preparing for Git 2.0 (diff)
downloadtgif-9fe0cf3a5ee01ebe0c323789cce3916b443980dc.tar.xz
branch.c: install_branch_config: simplify if chain
Simplify if chain in install_branch_config(). Signed-off-by: Adam <Adam@sigterm.info> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--branch.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/branch.c b/branch.c
index 723a36bc54..b2d59f137b 100644
--- a/branch.c
+++ b/branch.c
@@ -77,29 +77,29 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
strbuf_release(&key);
if (flag & BRANCH_CONFIG_VERBOSE) {
- if (remote_is_branch && origin)
- printf_ln(rebasing ?
- _("Branch %s set up to track remote branch %s from %s by rebasing.") :
- _("Branch %s set up to track remote branch %s from %s."),
- local, shortname, origin);
- else if (remote_is_branch && !origin)
- printf_ln(rebasing ?
- _("Branch %s set up to track local branch %s by rebasing.") :
- _("Branch %s set up to track local branch %s."),
- local, shortname);
- else if (!remote_is_branch && origin)
- printf_ln(rebasing ?
- _("Branch %s set up to track remote ref %s by rebasing.") :
- _("Branch %s set up to track remote ref %s."),
- local, remote);
- else if (!remote_is_branch && !origin)
- printf_ln(rebasing ?
- _("Branch %s set up to track local ref %s by rebasing.") :
- _("Branch %s set up to track local ref %s."),
- local, remote);
- else
- die("BUG: impossible combination of %d and %p",
- remote_is_branch, origin);
+ if (remote_is_branch) {
+ if (origin)
+ printf_ln(rebasing ?
+ _("Branch %s set up to track remote branch %s from %s by rebasing.") :
+ _("Branch %s set up to track remote branch %s from %s."),
+ local, shortname, origin);
+ else
+ printf_ln(rebasing ?
+ _("Branch %s set up to track local branch %s by rebasing.") :
+ _("Branch %s set up to track local branch %s."),
+ local, shortname);
+ } else {
+ if (origin)
+ printf_ln(rebasing ?
+ _("Branch %s set up to track remote ref %s by rebasing.") :
+ _("Branch %s set up to track remote ref %s."),
+ local, remote);
+ else
+ printf_ln(rebasing ?
+ _("Branch %s set up to track local ref %s by rebasing.") :
+ _("Branch %s set up to track local ref %s."),
+ local, remote);
+ }
}
}