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

[PATCH 0/1] Adjust diff stat width calculations so lines do not wrap in terminal when using --graph

From
Lucian Poston <lucian.poston@gmail.com>
Date
Mar 20, 2012, 07:38 UTC
Message-ID
<1332229097-19262-1-git-send-email-lucian.poston@gmail.com>

When diff stats are displayed in the terminal, the width is scaled to fit within the available $COLUMNS. The current stat width calculations do not factor in the diff output prefix that is displayed when when graphing the commit history e.g. `git log --graph --stat`. Consequently, the diff stats can wrap to next line breaking the text graph representation.

This patch adjusts the diff stat width calculations to prevent line wrapping when the text-based graph representation is displayed along with the diff stats.

Lucian Poston (1):
  Fix --stat width calculations to handle --graph
 diff.c                 |   55 ++++++++++++++++++++++++++++++++---------------
 t/t4052-stat-output.sh |   24 +++++++++++++++++++-
 2 files changed, 59 insertions(+), 20 deletions(-)
-- 
1.7.3.4
Next: Lucian Poston
Message 1 of 7 in “Adjust diff stat width calculations so lines do not wrap in terminal when using --graph”
  1. 0/1 Adjust diff stat width calculations so lines do not wrap in terminal when using --graphLucian Poston, Mar 20, 2012
  2. 1/1 Fix --stat width calculations to handle --graphLucian Poston, Mar 20, 2012
  3. Johannes SchindelinMar 20, 2012
  4. Junio C HamanoMar 20, 2012
  5. Lucian PostonMar 22, 2012
  6. Junio C HamanoMar 20, 2012
  7. Lucian PostonMar 22, 2012

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.