summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-31 16:31:19 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-31 16:31:20 -0700
commit1d9aaed2fa43dde6ea223b42c0a1a5a714343988 (patch)
tree99ad520c58d24d15a5ab153d39454d3393f513f0 /branch.c
parentad4d8911f8d680ea3948760ba025351ff031736d (diff)
parent9fe0cf3a5ee01ebe0c323789cce3916b443980dc (diff)
downloadgit-1d9aaed2fa43dde6ea223b42c0a1a5a714343988.tar.gz
Merge branch 'an/branch-config-message'
* an/branch-config-message: branch.c: install_branch_config: simplify if chain
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/branch.c b/branch.c
index 8eecb1d8c0..660097bc29 100644
--- a/branch.c
+++ b/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);
+ }
}
}