i18n: make warn_dangling_symref() automatically append \n
This helps remove \n from translatable strings 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
Apr 23, 2012 at 19:30 UTC
18986d5377f19e069afffa6689d507b22f1d6c71
3 files changed
+5
-4
builtin/fetch.c
+2
-2
@@ -537,8 +537,8 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map)
537
int result = 0;
538
struct ref *ref, *stale_refs = get_stale_heads(refs, ref_count, ref_map);
539
const char *dangling_msg = dry_run
540
- ? _(" (%s will become dangling)\n")
541
- : _(" (%s has become dangling)\n");
540
+ ? _(" (%s will become dangling)")
541
+ : _(" (%s has become dangling)");
542
543
for (ref = stale_refs; ref; ref = ref->next) {
544
if (!dry_run)
builtin/remote.c
+2
-2
@@ -1260,8 +1260,8 @@ static int prune_remote(const char *remote, int dry_run)
1260
int result = 0, i;
1261
struct ref_states states;
1262
const char *dangling_msg = dry_run
1263
- ? " %s will become dangling!\n"
1264
- : " %s has become dangling!\n";
1263
+ ? " %s will become dangling!"
1264
+ : " %s has become dangling!";
1265
1266
memset(&states, 0, sizeof(states));
1267
get_remote_ref_states(remote, &states, GET_REF_STATES);
refs.c
+1
@@ -395,6 +395,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
395
return 0;
396
397
fprintf(d->fp, d->msg_fmt, refname);
398
+ fputc('\n', d->fp);
399
return 0;
400
}
401