提交 18986d53 编写于 作者: N Nguyễn Thái Ngọc Duy 提交者: Junio C Hamano

i18n: make warn_dangling_symref() automatically append \n

This helps remove \n from translatable strings
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 9665627d
...@@ -537,8 +537,8 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map) ...@@ -537,8 +537,8 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map)
int result = 0; int result = 0;
struct ref *ref, *stale_refs = get_stale_heads(refs, ref_count, ref_map); struct ref *ref, *stale_refs = get_stale_heads(refs, ref_count, ref_map);
const char *dangling_msg = dry_run const char *dangling_msg = dry_run
? _(" (%s will become dangling)\n") ? _(" (%s will become dangling)")
: _(" (%s has become dangling)\n"); : _(" (%s has become dangling)");
for (ref = stale_refs; ref; ref = ref->next) { for (ref = stale_refs; ref; ref = ref->next) {
if (!dry_run) if (!dry_run)
......
...@@ -1260,8 +1260,8 @@ static int prune_remote(const char *remote, int dry_run) ...@@ -1260,8 +1260,8 @@ static int prune_remote(const char *remote, int dry_run)
int result = 0, i; int result = 0, i;
struct ref_states states; struct ref_states states;
const char *dangling_msg = dry_run const char *dangling_msg = dry_run
? " %s will become dangling!\n" ? " %s will become dangling!"
: " %s has become dangling!\n"; : " %s has become dangling!";
memset(&states, 0, sizeof(states)); memset(&states, 0, sizeof(states));
get_remote_ref_states(remote, &states, GET_REF_STATES); get_remote_ref_states(remote, &states, GET_REF_STATES);
......
...@@ -395,6 +395,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha ...@@ -395,6 +395,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
return 0; return 0;
fprintf(d->fp, d->msg_fmt, refname); fprintf(d->fp, d->msg_fmt, refname);
fputc('\n', d->fp);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册