Remove i18n legos in notifying new branch tracking setup

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jun 7, 2012 at 19:05 UTC d53a35032a67fde5b59c8a6a66e0466837cbaf1e
1 file changed +23 -15
branch.c
+23 -15
@@ -74,25 +74,33 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
74 strbuf_addf(&key, "branch.%s.rebase", local);
75 git_config_set(key.buf, "true");
76 }
77 + strbuf_release(&key);
78
79 if (flag & BRANCH_CONFIG_VERBOSE) {
79 - strbuf_reset(&key);
80 -
81 - strbuf_addstr(&key, origin ? "remote" : "local");
82 -
83 - /* Are we tracking a proper "branch"? */
84 - if (remote_is_branch) {
85 - strbuf_addf(&key, " branch %s", shortname);
86 - if (origin)
87 - strbuf_addf(&key, " from %s", origin);
88 - }
80 + if (remote_is_branch && origin)
81 + printf(rebasing ?
82 + "Branch %s set up to track remote branch %s from %s by rebasing.\n" :
83 + "Branch %s set up to track remote branch %s from %s.\n",
84 + local, shortname, origin);
85 + else if (remote_is_branch && !origin)
86 + printf(rebasing ?
87 + "Branch %s set up to track local branch %s by rebasing.\n" :
88 + "Branch %s set up to track local branch %s.\n",
89 + local, shortname);
90 + else if (!remote_is_branch && origin)
91 + printf(rebasing ?
92 + "Branch %s set up to track remote ref %s by rebasing.\n" :
93 + "Branch %s set up to track remote ref %s.\n",
94 + local, remote);
95 + else if (!remote_is_branch && !origin)
96 + printf(rebasing ?
97 + "Branch %s set up to track local ref %s by rebasing.\n" :
98 + "Branch %s set up to track local ref %s.\n",
99 + local, remote);
100 else
90 - strbuf_addf(&key, " ref %s", remote);
91 - printf("Branch %s set up to track %s%s.\n",
92 - local, key.buf,
93 - rebasing ? " by rebasing" : "");
101 + die("BUG: impossible combination of %d and %p",
102 + remote_is_branch, origin);
103 }
95 - strbuf_release(&key);
104 }
105
106 /*