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>

Adam committed Mar 10, 2014 at 01:32 UTC 9fe0cf3a5ee01ebe0c323789cce3916b443980dc
1 file changed +23 -23
branch.c
+23 -23
@@ -77,29 +77,29 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
77 strbuf_release(&key);
78
79 if (flag & BRANCH_CONFIG_VERBOSE) {
80 - if (remote_is_branch && origin)
81 - printf_ln(rebasing ?
82 - _("Branch %s set up to track remote branch %s from %s by rebasing.") :
83 - _("Branch %s set up to track remote branch %s from %s."),
84 - local, shortname, origin);
85 - else if (remote_is_branch && !origin)
86 - printf_ln(rebasing ?
87 - _("Branch %s set up to track local branch %s by rebasing.") :
88 - _("Branch %s set up to track local branch %s."),
89 - local, shortname);
90 - else if (!remote_is_branch && origin)
91 - printf_ln(rebasing ?
92 - _("Branch %s set up to track remote ref %s by rebasing.") :
93 - _("Branch %s set up to track remote ref %s."),
94 - local, remote);
95 - else if (!remote_is_branch && !origin)
96 - printf_ln(rebasing ?
97 - _("Branch %s set up to track local ref %s by rebasing.") :
98 - _("Branch %s set up to track local ref %s."),
99 - local, remote);
100 - else
101 - die("BUG: impossible combination of %d and %p",
102 - remote_is_branch, origin);
80 + if (remote_is_branch) {
81 + if (origin)
82 + printf_ln(rebasing ?
83 + _("Branch %s set up to track remote branch %s from %s by rebasing.") :
84 + _("Branch %s set up to track remote branch %s from %s."),
85 + local, shortname, origin);
86 + else
87 + printf_ln(rebasing ?
88 + _("Branch %s set up to track local branch %s by rebasing.") :
89 + _("Branch %s set up to track local branch %s."),
90 + local, shortname);
91 + } else {
92 + if (origin)
93 + printf_ln(rebasing ?
94 + _("Branch %s set up to track remote ref %s by rebasing.") :
95 + _("Branch %s set up to track remote ref %s."),
96 + local, remote);
97 + else
98 + printf_ln(rebasing ?
99 + _("Branch %s set up to track local ref %s by rebasing.") :
100 + _("Branch %s set up to track local ref %s."),
101 + local, remote);
102 + }
103 }
104 }
105