提交 9fe0cf3a 编写于 作者: A Adam 提交者: Junio C Hamano

branch.c: install_branch_config: simplify if chain

Simplify if chain in install_branch_config().
Signed-off-by: NAdam <Adam@sigterm.info>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 384364b5
...@@ -77,29 +77,29 @@ void install_branch_config(int flag, const char *local, const char *origin, cons ...@@ -77,29 +77,29 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
strbuf_release(&key); strbuf_release(&key);
if (flag & BRANCH_CONFIG_VERBOSE) { if (flag & BRANCH_CONFIG_VERBOSE) {
if (remote_is_branch && origin) if (remote_is_branch) {
printf_ln(rebasing ? if (origin)
_("Branch %s set up to track remote branch %s from %s by rebasing.") : printf_ln(rebasing ?
_("Branch %s set up to track remote branch %s from %s."), _("Branch %s set up to track remote branch %s from %s by rebasing.") :
local, shortname, origin); _("Branch %s set up to track remote branch %s from %s."),
else if (remote_is_branch && !origin) local, shortname, origin);
printf_ln(rebasing ? else
_("Branch %s set up to track local branch %s by rebasing.") : printf_ln(rebasing ?
_("Branch %s set up to track local branch %s."), _("Branch %s set up to track local branch %s by rebasing.") :
local, shortname); _("Branch %s set up to track local branch %s."),
else if (!remote_is_branch && origin) local, shortname);
printf_ln(rebasing ? } else {
_("Branch %s set up to track remote ref %s by rebasing.") : if (origin)
_("Branch %s set up to track remote ref %s."), printf_ln(rebasing ?
local, remote); _("Branch %s set up to track remote ref %s by rebasing.") :
else if (!remote_is_branch && !origin) _("Branch %s set up to track remote ref %s."),
printf_ln(rebasing ? local, remote);
_("Branch %s set up to track local ref %s by rebasing.") : else
_("Branch %s set up to track local ref %s."), printf_ln(rebasing ?
local, remote); _("Branch %s set up to track local ref %s by rebasing.") :
else _("Branch %s set up to track local ref %s."),
die("BUG: impossible combination of %d and %p", local, remote);
remote_is_branch, origin); }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册