提交 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
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);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册