mirror of
https://github.com/git/git.git
synced 2024-11-18 22:14:34 +01:00
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>
This commit is contained in:
parent
384364b5f1
commit
9fe0cf3a5e
46
branch.c
46
branch.c
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user