Git development
 help / color / mirror / Atom feed
* Git trims the last character of content from remotes
@ 2026-05-04 17:01 Hugo Osvaldo Barrera
  2026-05-05  0:34 ` Chris Torek
  2026-05-05  9:38 ` Git trims the last character of content from remotes Mikael Magnusson
  0 siblings, 2 replies; 9+ messages in thread
From: Hugo Osvaldo Barrera @ 2026-05-04 17:01 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-05-10 23:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 17:01 Git trims the last character of content from remotes Hugo Osvaldo Barrera
2026-05-05  0:34 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox