Re: [PATCH/RFC v2 2/2] diff.tcl: call "apply_tab_size 1" to fix alignment instead of spaces.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 28, 2026, 23:42 UTC
- Message-ID
- <xmqq4io5e23t.fsf@gitster.g>
- In-Reply-To
- <bf8e6231-e1c0-4c0c-b4d5-20f8d0044211@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
>> For us this bug is a show stopper that makes the diff in the >> git-gui window by default unreadable.
> Earlier, I said that I'm not fond of such a change. But I changed my > mind. I hadn't noticed so far that Gitk applies customized tabstops. Git > GUI and Gitk need not emulate the behavor of terminal windows faithfully > and can be more clever as far as tabstops are concerned.
I just peeked what gitk does, and it does use "settabs 0" (the equivalent of "apply_tab_size 0" in gitk world) for plain files, "settabs 1" for one parent regular commits, and "settabs $np" for n-parent merges, so what Chris is doing here makes git-gui match what gitk has been doing since 32f1b3e4 (gitk: Fix the tab setting in the diff display window, 2007-09-28) for close to 20 years ;-).
Having said that, the fact that they have been allowed to be different for so long tells me that the way characters immediately after tabs have been displayed in git-gui bothered nobody for a long time, and calling it a "show stopper" and "unreadable" is a great exaggeration, I must say.
Thanks.