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

Re: [PATCH 1/2] diff --stat: use asymptotic scaling in graph

From
Junio C Hamano <junkio@cox.net>
Date
Oct 12, 2006, 21:53 UTC
Message-ID
<7vlknlmc9y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<d620685f0610121237k458665c5m7bbde2d565d7ef81@mail.gmail.com>
apodtele <apodtele@gmail.com> writes:
Show 5 quoted lines
> Instead of conditionally scaling the stat graph for large changes,
> always scale it asymptotically: small changes shall appear without any
> distortions.
>
> Signed-off-by: Alexei Podtelezhnikov

Missing e-mail address on S-o-b line. If your mail From: line does not say who you are, please add an extra From: line in the body, like this:

	From: Alexei Podtelezhnikov <apodtele@gmail.com>
        Subject: [PATCH 1/2] diff --stat: ...
        Instead of ...
	Signed-off-by: Alexei Podtelezhnikov <apodtele@gmail.com>

I am not sure if any non-linear scaling is worth pursuing. Suppose your change set has three files modified:

	A	adds 20 lines, deletes 10 lines
        B	adds 10 lines, deletes 20 lines
        C	adds 30 lines, deletes 30 lines

When drawing into a specified width that leaves 20-column for the graph part, what would we see? What would we see if the graph part is 21-column wide? 59-column wide? 80-column wide?

For obvious reasons, the total length of A and B exceeds half of C, which looks quite misleading.

         A | ++++++++++++--------
         B | ++++++++------------
         C | +++++++++++++++---------------
We could align things in the middle, like this, though:
         A |    ++++++++++++--------
         B |        ++++++++------------
         C | +++++++++++++++---------------
Previous: Andy WhitcroftNext: A Large Angry SCM
Message 12 of 16 in “diff --stat: use asymptotic scaling in graph”
  1. 1/2 diff --stat: use asymptotic scaling in graphapodtele, Oct 12, 2006
  2. Martin WaitzOct 12, 2006
  3. apodteleOct 12, 2006
  4. A Large Angry SCMOct 12, 2006
  5. Martin WaitzOct 12, 2006
  6. A Large Angry SCMOct 12, 2006
  7. Johannes SchindelinOct 12, 2006
  8. apodteleOct 12, 2006
  9. Nicolas PitreOct 13, 2006
  10. apodteleOct 13, 2006
  11. Andy WhitcroftOct 13, 2006
  12. Junio C HamanoOct 12, 2006
  13. A Large Angry SCMOct 12, 2006
  14. Junio C HamanoOct 12, 2006
  15. apodteleOct 13, 2006
  16. Junio C HamanoOct 14, 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.