git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC v2 2/2] diff.tcl: call "apply_tab_size 1" to fix alignment instead of spaces.

From
GitHub Chris Idema <github_chris_idema@proton.me>
Date
Jan 29, 2026, 08:31 UTC
Message-ID
<AXTzN5mRXdWYZx55ARuBbRgndXW5zA51_wcnAV4KaUpk3kz6t8ZYfOk0Du5rg6zKhz0_O-4ZSkLNX6WkhTp4fjDFDMfCZAsTRCoBMH_IpMU=@proton.me>
In-Reply-To
<xmqqv7glcmee.fsf@gitster.g>
> From: Junio C Hamano <gitster@pobox.com>
>
> calling it a "show stopper" and "unreadable" is a great
> exaggeration, I must say.

We use clang-format to format most of our code. But we don't have that always available. So it's good to review indentation changes prior to commit. And we use either git diff or Git Gui for that. For many file changes I prefer Git Gui as you don't need to scroll.

For git diff there is a way to configure tab size to 4: git config --global core.pager 'less -x1,5' source: https://stackoverflow.com/a/10584237/15307950

For Git Gui and Gitk there is also a tab setting. But only in Git Gui it didn't work as expected. So with show stopper I meant that it's the only odd one. And since the code already uses apply_tab_size it makes sense to just apply it correctly in all scenarios.

My latest commit was tested for:
- "Modified, not staged"
- "Staged for commit"
- "Requires merge resolution"
- "Untracked, not staged"
- "Missing"
- "Staged for removal"

And it worked on my side. @@@ needs apply_tab_size 2 @@ needs apply_tab_size 1 the rest was already handled correctly

> From: Junio C Hamano <gitster@pobox.com>
>
> I noticed that gitk has code to deal with octopus merges

I would love to know how such a merge can be replicated. Is it also possible to have such a merge visible in Git Gui?

-- Chris
Previous: Junio C HamanoNext: Johannes Sixt
Message 19 of 30 in “diff.tcl: fixed alignment of tabs in git-gui diff by using spaces”
  1. diff.tcl: fixed alignment of tabs in git-gui diff by using spacesChris Idema via GitGitGadget, Jan 26, 2026
  2. Johannes SixtJan 26, 2026
  3. GitHub Chris IdemaJan 26, 2026
  4. Johannes SixtJan 26, 2026
  5. GitHub Chris IdemaJan 26, 2026
  6. Johannes SixtJan 26, 2026
  7. GitHub Chris IdemaJan 26, 2026
  8. GitHub Chris IdemaJan 26, 2026
  9. 0/2 diff.tcl: Fixed alignment of tabs in git-gui diff by using spaces.Chris Idema via GitGitGadget, Jan 27, 2026
  10. 2/2 diff.tcl: call "apply_tab_size 1" to fix alignment instead of spaces.Chris Idema via GitGitGadget, Jan 27, 2026
  11. Junio C HamanoJan 27, 2026
  12. Junio C HamanoJan 27, 2026
  13. GitHub Chris IdemaJan 28, 2026
  14. Johannes SixtJan 28, 2026
  15. GitHub Chris IdemaJan 28, 2026
  16. Johannes SixtJan 28, 2026
  17. Junio C HamanoJan 28, 2026
  18. Junio C HamanoJan 29, 2026
  19. GitHub Chris IdemaJan 29, 2026
  20. Johannes SixtJan 29, 2026
  21. Junio C HamanoJan 29, 2026
  22. 1/2 diff.tcl: fixed alignment of tabs in git-gui diff by using spacesChris Idema via GitGitGadget, Jan 27, 2026
  23. diff.tcl: made alignment of tabs in git-gui diff consistent with gitkChris Idema via GitGitGadget, Jan 28, 2026
  24. Johannes SixtJan 28, 2026
  25. GitHub Chris IdemaJan 28, 2026
  26. Junio C HamanoJan 29, 2026
  27. git-gui: shift tabstops to account for the first column of context diffsChris Idema via GitGitGadget, Jan 29, 2026
  28. Johannes SixtJan 29, 2026
  29. GitHub Chris IdemaMar 4, 2026
  30. Johannes SixtMar 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.