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 22, 2008, 07:21 UTC
Message-ID
<cb7bb73a0808220021w5d30d3c8i88ad85611035d2c5@mail.gmail.com>
In-Reply-To
<200808212332.07095.jnareb@gmail.com>
> It is a good idea, but not so good solution.
Ok, let's see if I can find a better way to do it 8-)
Show 13 quoted lines
>> --- a/gitweb/gitweb.css
>> +++ b/gitweb/gitweb.css
>
>> +span.refs span a {
>> +     text-decoration: none;
>> +     color: inherit;
>> +}
>
> Possible improvement:
>
> We would probably want to make this link discoverable, by adding
> underline on :hover, like for other "hidden links" in gitweb (for
> example in commitdiff view).
Can do that.
Show 18 quoted lines
>>                       my ($type, $name) = qw();
>> +                     my $git_type = git_get_type($ref);
>>                       # e.g. tags/v2.6.11 or heads/next
>>                       if ($ref =~ m!^(.*?)s?/(.*)$!) {
>>                               $type = $1;
>
> git_get_type calls 'git cat-file -t', so for each ref shown you make
> *additional call* to git command (additional fork).  Not good, especially
> that you can get information if a ref is a tag (indirect reference)
> or not one can get from within git_get_references; which in turn
> uses "git show-refs --dereference" and used to use either
> "git peek-remote ." or ".git/info/refs" file.  If there is <name>^{},
> then <name> is indirect reference: is a tag.
>
> As we display ref markers only for log-like views, marker can be tag
> or can be "lightweight reference" and be only a commit (in theory
> we could show ref markers also for tree and blob items, but it is not
> important now).

By looking at git_get_reference() what I see is basically the use of the same field as $type in format_ref_marker(). I can probably use that, although it means that any future extensions to ref marker display will need to hack the routine too. (This would mean that the patch would be more similar to my original patch http://marc.info/?l=git&m=121769155017642&w=2 ).

If this is not what you're suggesting, then I'm afraid I don't fully grasp your idea.

-- 
Giuseppe "Oblomov" Bilotta
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 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.