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

Re: [PATCH 1/3] diff --stat: allow custom diffstat output width.

From
Junio C Hamano <junkio@cox.net>
Date
Sep 29, 2006, 01:35 UTC
Message-ID
<7vk63nsbec.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0609281458420.3952@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> You should probably check the "width" and "name_width" values for sanity.

The output code forces (well, at least tries to force) some sanity into these values when they are not, so probably we do not need it. If we want, we could check something like:

    	if (name_width < 10 || width - name_width < 15)
		die("at least 10 for name, and 15+name for width please");

The number 10 is totally arbitrary; among the total area that is given by width, after subtracting name_width, 10 columns are taken by left and right end space, vertical bar and numbers, so the above gives at least 5 columns to draw the graph.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 6 of 12 in “diff --stat: allow custom diffstat output width.”
  1. 1/3 diff --stat: allow custom diffstat output width.Junio C Hamano, Sep 27, 2006
  2. David RientjesSep 27, 2006
  3. Linus TorvaldsSep 28, 2006
  4. Junio C HamanoSep 28, 2006
  5. Linus TorvaldsSep 28, 2006
  6. Junio C HamanoSep 29, 2006
  7. Junio C HamanoSep 29, 2006
  8. Linus TorvaldsSep 29, 2006
  9. Junio C HamanoSep 29, 2006
  10. Linus TorvaldsSep 29, 2006
  11. Adrian BunkSep 28, 2006
  12. Johannes SchindelinSep 28, 2006

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.