Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
39af7896
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39af7896
编写于
3月 20, 2012
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'jc/advise-i18n' into maint-1.7.8
* jc/advise-i18n: i18n of multi-line advice messages
上级
bd193f46
23cb5bf3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
12 deletion
+20
-12
advice.c
advice.c
+16
-7
builtin/revert.c
builtin/revert.c
+4
-5
未找到文件。
advice.c
浏览文件 @
39af7896
...
...
@@ -21,11 +21,21 @@ static struct {
void
advise
(
const
char
*
advice
,
...)
{
struct
strbuf
buf
=
STRBUF_INIT
;
va_list
params
;
const
char
*
cp
,
*
np
;
va_start
(
params
,
advice
);
vreportf
(
"hint: "
,
advice
,
params
);
strbuf_addf
(
&
buf
,
advice
,
params
);
va_end
(
params
);
for
(
cp
=
buf
.
buf
;
*
cp
;
cp
=
np
)
{
np
=
strchrnul
(
cp
,
'\n'
);
fprintf
(
stderr
,
_
(
"hint: %.*s
\n
"
),
(
int
)(
np
-
cp
),
cp
);
if
(
*
np
)
np
++
;
}
strbuf_release
(
&
buf
);
}
int
git_default_advice_config
(
const
char
*
var
,
const
char
*
value
)
...
...
@@ -46,16 +56,15 @@ int git_default_advice_config(const char *var, const char *value)
int
error_resolve_conflict
(
const
char
*
me
)
{
error
(
"'%s' is not possible because you have unmerged files."
,
me
);
if
(
advice_resolve_conflict
)
{
if
(
advice_resolve_conflict
)
/*
* Message used both when 'git commit' fails and when
* other commands doing a merge do.
*/
advise
(
"Fix them up in the work tree,"
);
advise
(
"and then use 'git add/rm <file>' as"
);
advise
(
"appropriate to mark resolution and make a commit,"
);
advise
(
"or use 'git commit -a'."
);
}
advise
(
_
(
"Fix them up in the work tree,
\n
"
"and then use 'git add/rm <file>' as
\n
"
"appropriate to mark resolution and make a commit,
\n
"
"or use 'git commit -a'."
));
return
-
1
;
}
...
...
builtin/revert.c
浏览文件 @
39af7896
...
...
@@ -343,11 +343,10 @@ static void print_advice(int show_hint)
return
;
}
if
(
show_hint
)
{
advise
(
"after resolving the conflicts, mark the corrected paths"
);
advise
(
"with 'git add <paths>' or 'git rm <paths>'"
);
advise
(
"and commit the result with 'git commit'"
);
}
if
(
show_hint
)
advise
(
_
(
"after resolving the conflicts, mark the corrected paths
\n
"
"with 'git add <paths>' or 'git rm <paths>'
\n
"
"and commit the result with 'git commit'"
));
}
static
void
write_message
(
struct
strbuf
*
msgbuf
,
const
char
*
filename
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录