зеркало из https://github.com/microsoft/git.git
Merge branch 'an/branch-config-message'
* an/branch-config-message: branch.c: install_branch_config: simplify if chain
This commit is contained in:
Коммит
1d9aaed2fa
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 (shortname && 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 (shortname && !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 (!shortname && 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 (!shortname && !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 %p and %p",
|
||||
shortname, origin);
|
||||
if (shortname) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче