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

Re: [PATCH] diff.tcl: fixed alignment of tabs in git-gui diff by using spaces

From
Johannes Sixt <j6t@kdbg.org>
Date
Jan 26, 2026, 13:59 UTC
Message-ID
<07014d88-67ed-498a-8cc1-423c77972fd7@kdbg.org>
In-Reply-To
<Lj9kojJwK1ZAtvE5nj6rTq5EXf1-QhsRlmBDM9YntbYeWb3J07mlbM-njNco2XT1pSPXsNVbo9Uc5kJOHihb11odjthYN4YtuhVdNwxSIqk=@proton.me>
Am 26.01.26 um 14:32 schrieb GitHub Chris Idema:
Show 9 quoted lines
> Here is how you can reproduce the problem:
> mkdir test_tabs
> cd test_tabs
> git init
> echo "" > test.c
> git add .
> git commit -m "initial commit"
> echo -e "int test1\t= 5;\nint test11\t= 6;\nint test111\t= 6;\n" > test.c
> git gui

So, you mean that if the tab width is set to 4, then the tab stops are not aligned anymore?

>> Do "Stage Line/Hunk for Commit" still work after this conversion?
> I'm sorry but I don't know what this means.

These are commands in the context menu of the diff panel. They extract the text from the widget and massage it into a patch. My suspicion is that the patch text does not match the actual file contents, and so the commands fail.

-- Hannes
Previous: GitHub Chris IdemaNext: GitHub Chris Idema
Message 4 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.