Merge branch 'nd/i18n-branch-lego'
Restructure the way message strings are created, in preparation for marking them for i18n. * nd/i18n-branch-lego: Remove i18n legos in notifying new branch tracking setup
This commit is contained in:
commit
9b3dacc95f
38
branch.c
38
branch.c
@ -74,25 +74,33 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
|
|||||||
strbuf_addf(&key, "branch.%s.rebase", local);
|
strbuf_addf(&key, "branch.%s.rebase", local);
|
||||||
git_config_set(key.buf, "true");
|
git_config_set(key.buf, "true");
|
||||||
}
|
}
|
||||||
|
strbuf_release(&key);
|
||||||
|
|
||||||
if (flag & BRANCH_CONFIG_VERBOSE) {
|
if (flag & BRANCH_CONFIG_VERBOSE) {
|
||||||
strbuf_reset(&key);
|
if (remote_is_branch && origin)
|
||||||
|
printf(rebasing ?
|
||||||
strbuf_addstr(&key, origin ? "remote" : "local");
|
"Branch %s set up to track remote branch %s from %s by rebasing.\n" :
|
||||||
|
"Branch %s set up to track remote branch %s from %s.\n",
|
||||||
/* Are we tracking a proper "branch"? */
|
local, shortname, origin);
|
||||||
if (remote_is_branch) {
|
else if (remote_is_branch && !origin)
|
||||||
strbuf_addf(&key, " branch %s", shortname);
|
printf(rebasing ?
|
||||||
if (origin)
|
"Branch %s set up to track local branch %s by rebasing.\n" :
|
||||||
strbuf_addf(&key, " from %s", origin);
|
"Branch %s set up to track local branch %s.\n",
|
||||||
}
|
local, shortname);
|
||||||
|
else if (!remote_is_branch && origin)
|
||||||
|
printf(rebasing ?
|
||||||
|
"Branch %s set up to track remote ref %s by rebasing.\n" :
|
||||||
|
"Branch %s set up to track remote ref %s.\n",
|
||||||
|
local, remote);
|
||||||
|
else if (!remote_is_branch && !origin)
|
||||||
|
printf(rebasing ?
|
||||||
|
"Branch %s set up to track local ref %s by rebasing.\n" :
|
||||||
|
"Branch %s set up to track local ref %s.\n",
|
||||||
|
local, remote);
|
||||||
else
|
else
|
||||||
strbuf_addf(&key, " ref %s", remote);
|
die("BUG: impossible combination of %d and %p",
|
||||||
printf("Branch %s set up to track %s%s.\n",
|
remote_is_branch, origin);
|
||||||
local, key.buf,
|
|
||||||
rebasing ? " by rebasing" : "");
|
|
||||||
}
|
}
|
||||||
strbuf_release(&key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user