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

Re: [PATCH] Add --show-size to git log to print message size

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Jul 25, 2007, 09:38 UTC
Message-ID
<e5bfff550707250238i4fd7926en4c924a0debbb9a3c@mail.gmail.com>
In-Reply-To
<7vabtlf7tf.fsf@assigned-by-dhcp.cox.net>
On 7/25/07, Junio C Hamano <gitster@pobox.com> wrote:
> I've been re-reviewing recent patches, and this is one of them.

Thanks for pushing to pu. Please tell me if you want me to send you a patch to update to what we have discussed, specifically using "length unknown" and changing the name to --show-lengths.

Show 7 quoted lines
> However, I am wondering if this is an intended behaviour...
>
> : git.git master; ./git-log --log-size --abbrev-commit --pretty=oneline \
>   ko/master..master
> 9d468ac... log size 47
> Add --log-size to git log to print message size
> ca193cf... log size 40

Well, the patch should be used to speedup the parsing by tools because you can skip big part of the record and jump directly to the beginning of the next one. So IMHO I don't see a lot of sense in using it together with --pretty=oneline.

Anyway only default options should be guaranteed to behave correctly with all the other options. In general, responsibility for what you see on the screen it's on the tips of user's fingers. IMHO responsibility of git is of not crashing and do not show incorrect info, not that the info should be useful.

Paul, I don't know gitk and Tcl to being able to answer myself, but I would like to know if this new option could be useful also for gitk.

This option, after the first line, gives the size of the following part of the record. Does this allow you to delay the parsing of the biggest part of the commit record?

Author name, date, log title, log message could be read only when it's needed, so that after reading the first couple lines of a commit you can point directly to the beginning of the next one skipping the rest.

Marco
Previous: Junio C Hamano
Message 29 of 29 in “Add --show-size to git log to print message size”
  1. Add --show-size to git log to print message sizeMarco Costalba, Jul 14, 2007
  2. Junio C HamanoJul 14, 2007
  3. Marco CostalbaJul 14, 2007
  4. Alex RiesenJul 15, 2007
  5. Marco CostalbaJul 15, 2007
  6. Alex RiesenJul 15, 2007
  7. Marco CostalbaJul 15, 2007
  8. Marco CostalbaJul 15, 2007
  9. SeanJul 15, 2007
  10. Marco CostalbaJul 15, 2007
  11. SeanJul 15, 2007
  12. Marco CostalbaJul 15, 2007
  13. SeanJul 15, 2007
  14. Marco CostalbaJul 15, 2007
  15. SeanJul 15, 2007
  16. Marco CostalbaJul 15, 2007
  17. Linus TorvaldsJul 15, 2007
  18. Marco CostalbaJul 15, 2007
  19. Marco CostalbaJul 16, 2007
  20. Alex RiesenJul 16, 2007
  21. Junio C HamanoJul 16, 2007
  22. Marco CostalbaJul 16, 2007
  23. Marco CostalbaJul 16, 2007
  24. Junio C HamanoJul 16, 2007
  25. Marco CostalbaJul 16, 2007
  26. Andy ParkinsJul 17, 2007
  27. Marco CostalbaJul 17, 2007
  28. Junio C HamanoJul 25, 2007
  29. Marco CostalbaJul 25, 2007

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.