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

Re: [PATCH/RFC] gitweb: Great subroutines renaming

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 9, 2006, 10:26 UTC
Message-ID
<ebcd8r$bi7$1@sea.gmane.org>
In-Reply-To
<7vejvsyum8.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Matthias Lederhofer has noticed that parsing all the tags in "summary" and
>> "tags" views, while we use only epoch/timestamp information to sort them
>> and discard most of parsed input, is bottleneck due to the fact that
>> usually number of tags is linear with history (version tags) and the fact
>> that for each tag is one invocation of git (one fork, two execs).
> 
> Maybe we would want to expose for_each_ref somehow to the
> command level then.  Looking at how "git branch" without any
> argument lists the branches, and how "git tag -l" lists the
> tags, it appears that we could benefit from such a command [*1*].
> -- >8 -- [*1*] -- >8 --
> [PATCH] git-show-refs
> 
> Implementation is left as an exercise ;-)
[...]
> +SYNOPSIS
> +--------
> +'git-show-refs' [--count=<max>] [--sort=<sortkeys>] [--format=<format>] [<pattern>]

It would be useful for application in gitweb to have [-l|--count-lines] option which would print number of lines (excluding the one with number of lines) before any output. It could be used to know before reading all the output how many lines would be, and if there is something more than (for --count=<max>) <max> lines.

It is needed in gitweb to create pagination/paging navigation bar. Currently it is done by reading all the output into array, and checking length of this array.

While at it, --skip=<count> would also be nice, although not that necessary.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Jakub NarebskiNext: Junio C Hamano
Message 15 of 30 in “gitweb: Great subroutines renaming”
  1. gitweb: Great subroutines renamingJakub Narebski, Aug 7, 2006
  2. Junio C HamanoAug 7, 2006
  3. Jakub NarebskiAug 7, 2006
  4. Jakub NarebskiAug 7, 2006
  5. Junio C HamanoAug 7, 2006
  6. Jakub NarebskiAug 7, 2006
  7. Jakub NarebskiAug 7, 2006
  8. Junio C HamanoAug 7, 2006
  9. Jakub NarebskiAug 8, 2006
  10. Jakub NarebskiAug 8, 2006
  11. Junio C HamanoAug 8, 2006
  12. Jakub NarebskiAug 8, 2006
  13. Jakub NarebskiAug 8, 2006
  14. Jakub NarebskiAug 8, 2006
  15. Jakub NarebskiAug 9, 2006
  16. Junio C HamanoAug 9, 2006
  17. Jakub NarebskiAug 9, 2006
  18. Junio C HamanoAug 9, 2006
  19. Jakub NarebskiAug 8, 2006
  20. Jakub NarebskiAug 8, 2006
  21. Junio C HamanoAug 8, 2006
  22. Jakub NarebskiAug 8, 2006
  23. Jakub NarebskiAug 9, 2006
  24. Junio C HamanoAug 9, 2006
  25. Jakub NarebskiAug 10, 2006
  26. Jakub NarebskiAug 12, 2006
  27. Junio C HamanoAug 13, 2006
  28. Junio C HamanoAug 13, 2006
  29. Jakub NarebskiAug 13, 2006
  30. Junio C HamanoAug 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.