diff options
author | Adam <adam@sigterm.info> | 2014-03-10 01:32:01 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-24 12:43:07 -0700 |
commit | 9fe0cf3a5ee01ebe0c323789cce3916b443980dc (patch) | |
tree | f3300a098a05c009bb046525becede762ae35410 | |
parent | Start preparing for Git 2.0 (diff) | |
download | tgif-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.c | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -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); + } } } |