git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: "Lea Wiemann" <lewiemann@gmail.com>,
	git@vger.kernel.org, "Petr Baudis" <pasky@ucw.cz>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] gitweb: ref markers link to named shortlogs
Date: Tue, 26 Aug 2008 01:28:14 +0200	[thread overview]
Message-ID: <cb7bb73a0808251628q6af52292sc296fb63565b6eaa@mail.gmail.com> (raw)
In-Reply-To: <200808242237.53953.jnareb@gmail.com>

On Sun, Aug 24, 2008 at 10:37 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> 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

  reply	other threads:[~2008-08-25 23:31 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 18:04 [PATCH] gitweb: ref markers link to named shortlogs Giuseppe Bilotta
2008-08-21 21:32 ` Jakub Narebski
2008-08-22  7:21   ` Giuseppe Bilotta
2008-08-22  8:49     ` Jakub Narebski
     [not found]       ` <cb7bb73a0808220231w37d2341eic56cabb595399f68@mail.gmail.com>
2008-08-22 10:56         ` Jakub Narebski
2008-08-22 12:34           ` Giuseppe Bilotta
2008-08-22 12:39           ` [PATCH v4] " Giuseppe Bilotta
2008-08-22 13:01             ` Jakub Narebski
2008-08-22 13:20               ` Giuseppe Bilotta
2008-08-22 13:42                 ` Jakub Narebski
2008-08-22 14:03                   ` Giuseppe Bilotta
2008-08-22 13:29               ` [PATCH v5] " Giuseppe Bilotta
2008-08-24 23:53                 ` Jakub Narebski
2008-08-25  2:05                   ` Miklos Vajna
2008-08-25  2:44                     ` Jakub Narebski
2008-08-25  4:11                       ` Junio C Hamano
2008-08-25 18:42                         ` Jakub Narebski
2008-08-25 19:48                           ` Junio C Hamano
2008-08-26 12:16                           ` [PATCH v6] " Giuseppe Bilotta
2008-08-26 13:09                           ` [PATCH v7] " Giuseppe Bilotta
2008-08-22  8:03   ` [PATCHv3] " Giuseppe Bilotta
2008-08-24 19:30 ` [PATCH] " Lea Wiemann
2008-08-24 19:41   ` Giuseppe Bilotta
2008-08-24 20:37   ` Jakub Narebski
2008-08-25 23:28     ` Giuseppe Bilotta [this message]
2008-08-26  8:15       ` Jakub Narebski
2008-08-26 10:58         ` Giuseppe Bilotta
2008-08-26 11:49           ` Jakub Narebski
2008-08-26 12:29             ` Giuseppe Bilotta
2008-08-27 18:36             ` Giuseppe Bilotta
2008-08-28  1:43             ` Lea Wiemann
2008-08-28  6:26               ` Giuseppe Bilotta
2008-08-28  6:48               ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2008-08-02 15:39 Giuseppe Bilotta
2008-08-03 12:03 ` Petr Baudis
2008-08-03 13:14   ` Giuseppe Bilotta
2008-08-03 13:20     ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb7bb73a0808251628q6af52292sc296fb63565b6eaa@mail.gmail.com \
    --to=giuseppe.bilotta@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=lewiemann@gmail.com \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).