OSDN Git Service

i18n: make warn_dangling_symref() automatically append \n
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 23 Apr 2012 12:30:25 +0000 (19:30 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Apr 2012 21:55:48 +0000 (14:55 -0700)
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>
builtin/fetch.c
builtin/remote.c
refs.c

index 65f5f9b..a8c3e4c 100644 (file)
@@ -537,8 +537,8 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map)
        int result = 0;
        struct ref *ref, *stale_refs = get_stale_heads(refs, ref_count, ref_map);
        const char *dangling_msg = dry_run
-               ? _("   (%s will become dangling)\n")
-               : _("   (%s has become dangling)\n");
+               ? _("   (%s will become dangling)")
+               : _("   (%s has become dangling)");
 
        for (ref = stale_refs; ref; ref = ref->next) {
                if (!dry_run)
index fec92bc..1b03473 100644 (file)
@@ -1260,8 +1260,8 @@ static int prune_remote(const char *remote, int dry_run)
        int result = 0, i;
        struct ref_states states;
        const char *dangling_msg = dry_run
-               ? " %s will become dangling!\n"
-               : " %s has become dangling!\n";
+               ? " %s will become dangling!"
+               : " %s has become dangling!";
 
        memset(&states, 0, sizeof(states));
        get_remote_ref_states(remote, &states, GET_REF_STATES);
diff --git a/refs.c b/refs.c
index c9f6835..052c2f6 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -395,6 +395,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
                return 0;
 
        fprintf(d->fp, d->msg_fmt, refname);
+       fputc('\n', d->fp);
        return 0;
 }