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

Re: [PATCH] gitweb: ref markers link to named shortlogs

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Aug 25, 2008, 23:28 UTC
Message-ID
<cb7bb73a0808251628q6af52292sc296fb63565b6eaa@mail.gmail.com>
In-Reply-To
<200808242237.53953.jnareb@gmail.com>
On Sun, Aug 24, 2008 at 10:37 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 28 quoted lines
> Lea Wiemann wrote:
>> Giuseppe Bilotta wrote:
>> > +                   my $git_type = git_get_type($ref);
>> > [...]
>> > +                           $cgi->a({-href => href(action=>$view{$git_type} || $git_type, hash=>$name)}, $name) .
>>
>> Since some of this thread seems to be about performance, you might just
>> make this a link to action => 'object' (and save the git_get_type call)
>> and let gitweb Do The Right Thing when the link is followed.
>>
>> [Disclaimer: Haven't read the whole thread, and haven't checked if
>> action=object is actually doing the right thing here.]
>
> First, only the first patch (and perhaps second) called git_get_type;
> v4 and v5 do not.  Second, link to 'object' action would not do the
> right thing; we want either 'shortlog' or 'tag' view, not 'commit'
> or 'tag' view.
>
> What this patch does is making ref markers in the log-like views, and
> in the commit subject line headers in other view be "hidden links" to
> either 'shortlog' (in the case of ref being head/branch, or lightweight
> tag), or to 'tag' view in the case of annotated tag.  We rely on the
> fact that we know what type of object refs points to (currently it is
> only 'commit', which might change, but the fact that we know type of
> object for which we show marker would not change), and the fact that
> tags point to given object only indirectly, and only tags can point
> indirectly (^{} suffix in "git show-ref --dereference", and
> "git ls-remote .", and $GIT_DIR/info/refs).

However, Lea's idea has its own merit. I hacked up a patch series that implements a git_marker_view() function (or fucntion as the shortlog says 8-P) and *that* one is used for ref markers, you can see it (3 patches) here: http://git.oblomov.eu/git/shortlog/heads/gitweb/shortlog..heads/gitweb/refmark [it's on top of other stuff but it's actually independent from the other stuff].

The advantage of this approach is that you actually it's more flexible in case future expansions lead to other differences in object vs marker view (currently the only difference is commit => shortlog): such differences just need to be added to the appropriate %views hash.

The disadvantage is that we don't care about the difference between lightweight and annotated tags, so there is no more visual difference about it, something which patch v5 does. This could of course be addressed separately as needed.

So, should I resend v5 with the small change about refs canonical form, or is somebody else doing it? Or is the new idea as implemented in the above mentioned changeset preferrable? Should I send that patches to the mailing list?

Let me know, I've got plenty more stuff ready for gitweb and I'm eager to see them accepted upstream 8-D

-- 
Giuseppe "Oblomov" Bilotta
Previous: Jakub NarebskiNext: Jakub Narebski
Message 9 of 33 in “gitweb: ref markers link to named shortlogs”
  1. gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 21, 2008
  2. Jakub NarebskiAug 21, 2008
  3. Giuseppe BilottaAug 22, 2008
  4. Jakub NarebskiAug 22, 2008
  5. [PATCHv3] gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 22, 2008
  6. Lea WiemannAug 24, 2008
  7. Giuseppe BilottaAug 24, 2008
  8. Jakub NarebskiAug 24, 2008
  9. Giuseppe BilottaAug 25, 2008
  10. Jakub NarebskiAug 26, 2008
  11. Giuseppe BilottaAug 26, 2008
  12. Jakub NarebskiAug 26, 2008
  13. Giuseppe BilottaAug 26, 2008
  14. Giuseppe BilottaAug 27, 2008
  15. Lea WiemannAug 28, 2008
  16. Giuseppe BilottaAug 28, 2008
  17. Jakub NarebskiAug 28, 2008
  18. Jakub NarebskiAug 22, 2008
  19. Giuseppe BilottaAug 22, 2008
  20. gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 22, 2008
  21. Jakub NarebskiAug 22, 2008
  22. Giuseppe BilottaAug 22, 2008
  23. Jakub NarebskiAug 22, 2008
  24. Giuseppe BilottaAug 22, 2008
  25. gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 22, 2008
  26. Jakub NarebskiAug 24, 2008
  27. Miklos VajnaAug 25, 2008
  28. Jakub NarebskiAug 25, 2008
  29. Junio C HamanoAug 25, 2008
  30. Jakub NarebskiAug 25, 2008
  31. Junio C HamanoAug 25, 2008
  32. gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 26, 2008
  33. gitweb: ref markers link to named shortlogsGiuseppe Bilotta, Aug 26, 2008

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.