Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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>
  • Loading branch information...
commit d53a35032a67fde5b59c8a6a66e0466837cbaf1e 1 parent 21dfc09
Nguyễn Thái Ngọc Duy pclouds authored gitster committed

Showing 1 changed file with 23 additions and 15 deletions. Show diff stats Hide diff stats

  1. +23 15 branch.c
38 branch.c
@@ -74,25 +74,33 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
74 74 strbuf_addf(&key, "branch.%s.rebase", local);
75 75 git_config_set(key.buf, "true");
76 76 }
  77 + strbuf_release(&key);
77 78
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);
89 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);
94 103 }
95   - strbuf_release(&key);
96 104 }
97 105
98 106 /*

0 comments on commit d53a350

Please sign in to comment.
Something went wrong with that request. Please try again.