diff --git a/builtin/fetch.c b/builtin/fetch.c index 65f5f9b72f92ec64ac5ad1ad264f78199337aba6..a8c3e4ceb8011d78287c13c03f62970be27f025c 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -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) diff --git a/builtin/remote.c b/builtin/remote.c index fec92bc66e41b82f929e37b1935d00d6558c34a0..1b034731b484af1df87df7290036e8494fa170af 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -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 c9f68353517bb6dcd4b19114a5191fdf9075a8d1..052c2f6058a3bbf97eeff236b288bf36afe36c7f 100644 --- 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; }