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

Wrong tabs in terminal output for git diff

From
TMTimothy Madden <terminatorul@gmail.com>
Date
Jun 11, 2021, 19:25 UTC
Message-ID
<8d3f8cf4-24ec-1271-ccd3-70db24f53523@gmail.com>
Hello,

For git diff and git show commands, terminal output appears with wrong tab stops (missaligned).

Because diff operation inserts a new column at character position 1, for the +, - and space characters, the diff content appears shifted to the right by 1 column. But not the tab stop positions. So relative to the text, the tab stops now appear off-by-one (shifted to the left).

This results in text that appearing missaligned, even though the original file looks fine before the diff.

I believe this is not a new issue, since git gui does the right thing and the tab stops are aligned properly in the GUI.

Is it possible please to fix diff output as well, when used in the terminal (interactive mode) ?

(I can include screenshots but I am not sure what the mailing list policy is about that)

-- Thank you, Timothy Madden

Next: Felipe Contreras
Message 1 of 5 in “Wrong tabs in terminal output for git diff”
  1. Timothy MaddenJun 11, 2021
  2. Felipe ContrerasJun 11, 2021
  3. Phil HordJun 12, 2021
  4. Jeff KingJun 13, 2021
  5. Junio C HamanoJun 14, 2021

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.