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 | 384364b5f1aa0c3b7610a1b3c9eca2c210e61b41 (diff) | |
download | git-9fe0cf3a5ee01ebe0c323789cce3916b443980dc.tar.gz |
branch.c: install_branch_config: simplify if chainan/branch-config-message
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); + } } } |