Skip to content

Commit

Permalink
branch.c: install_branch_config: simplify if chain
Browse files Browse the repository at this point in the history
Simplify if chain in install_branch_config().

Signed-off-by: Adam <Adam@sigterm.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Adam authored and Junio C Hamano committed Mar 24, 2014
1 parent 384364b commit 9fe0cf3
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions branch.c
Original file line number Diff line number Diff line change
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 (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);
}
}
}

Expand Down

0 comments on commit 9fe0cf3

Please sign in to comment.