From: "Hugo Osvaldo Barrera" <hugo@whynothugo.nl>
To: git@vger.kernel.org
Subject: Git trims the last character of content from remotes
Date: Mon, 04 May 2026 19:01:50 +0200 [thread overview]
Message-ID: <2d3f5504-f5dd-4171-96e8-b5633b6a1f5e@app.fastmail.com> (raw)
Hi all,
When I push content to GitLab, the remote server sends back some text which git
then prints to stderr:
remote:
remote: To create a merge request for zk, visit:
remote: https://gitlab.alpinelinux.org/WhyNotHugo/aports/-/merge_requests/new?merge_request%5Bsource_branch%5D=zk
remote:
When the width of a whole line is the same as my terminal width, the last digit
gets trimmed off. E.g.: if I resize my terminal for the above to fix exactly,
and re-run the same command, git prints:
remote: https://gitlab.alpinelinux.org/WhyNotHugo/aports/-/merge_requests/new?merge_request%5Bsource_branch%5D=z
From what I can tell, sideband.c prints ANSI_SUFFIX = "\033[K", this escape
sequence being "clear the line from the current position until the end of the
line", and this is the root cause of the issue.
When piping to cat or to a file, this sequence is not printed, so the output is
fine.
Is this a bug?
Thanks,
PS: please CC me, as I am not subscribed to the list.
--
Hugo
next reply other threads:[~2026-05-04 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 17:01 Hugo Osvaldo Barrera [this message]
2026-05-05 0:34 ` Git trims the last character of content from remotes Chris Torek
2026-05-05 19:41 ` René Scharfe
2026-05-06 9:37 ` Mikael Magnusson
2026-05-06 9:40 ` Mikael Magnusson
2026-05-06 16:00 ` René Scharfe
2026-05-10 12:42 ` [PATCH] sideband: clear full line when printing remote messages René Scharfe
2026-05-10 23:30 ` Junio C Hamano
2026-05-05 9:38 ` Git trims the last character of content from remotes Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d3f5504-f5dd-4171-96e8-b5633b6a1f5e@app.fastmail.com \
--to=hugo@whynothugo.nl \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox