Skip to content

Commit

Permalink
Merge branch 'an/branch-config-message'
Browse files Browse the repository at this point in the history
* an/branch-config-message:
  branch.c: install_branch_config: simplify if chain
  • Loading branch information
gitster committed Mar 31, 2014
2 parents ad4d891 + 9fe0cf3 commit 1d9aaed
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions branch.c
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 1d9aaed

Please sign in to comment.