diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-09 14:31:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-09 14:31:43 -0700 |
commit | 39b2c6f77ed451ed9ea4080aa878f6d25f21ecc4 (patch) | |
tree | cc44cf331cb86dde59c31cf6fa10ffc2bc248f2d /advice.c | |
parent | 8289a36f8725d33f5bdff2a5aeaa0b0369ad8ff8 (diff) | |
parent | 2d8cf94b28de9da683ddd40961a3a572f2741cf3 (diff) | |
download | git-39b2c6f77ed451ed9ea4080aa878f6d25f21ecc4.tar.gz |
Merge branch 'jc/advice-sans-trailing-whitespace'
The "hint:" messages given by the advice mechanism, when given a
message with a blank line, left a line with trailing whitespace,
which has been cleansed.
* jc/advice-sans-trailing-whitespace:
advice: omit trailing whitespace
Diffstat (limited to 'advice.c')
-rw-r--r-- | advice.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -105,8 +105,9 @@ static void vadvise(const char *advice, int display_instructions, for (cp = buf.buf; *cp; cp = np) { np = strchrnul(cp, '\n'); - fprintf(stderr, _("%shint: %.*s%s\n"), + fprintf(stderr, _("%shint:%s%.*s%s\n"), advise_get_color(ADVICE_COLOR_HINT), + (np == cp) ? "" : " ", (int)(np - cp), cp, advise_get_color(ADVICE_COLOR_RESET)); if (*np) |