git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: [PATCH 0/3] gitweb: Better symbolic link support in "tree" view
Date: Sun, 10 Dec 2006 13:25:44 +0100	[thread overview]
Message-ID: <11657535491406-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <7vk616ezu5.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote in
"Re: [PATCH] gitweb: Better symbolic link support in "tree" view":

> If you wanted to do this, a better way would be to have a new
> view that takes a commit/tree object and a path from the top of
> the repository, and shows either "no such path in that tree" or
> "here is the view for that object, by the way it was a blob."
> page.  Then your list drawing would still need to open each
> symlink blob to show " -> link_target", and need to check if it
> goes outside the repository (I would assume you are handling
> relative links as well), but you do not need to do expensive
> ls-tree step one per symlink on the page.  The href attr of the
> A element " -> link_target" would point at that "universal
> object view" with the link_target pathname (that is, the blob
> contents) and the commit/tree object name (h or hb I do not know
> which) and you will spend cycles to run ls-tree only when the
> user actually asks to follow that link.
> 
> In other words, I think trying to be lazy is extremely important
> while drawing a big list.

I not necessarily agree; I think that symbolic links are sufficnetly
rare that a bit more time spent to make the view better for end user
(link only if target exists) is worth it. But...

Here follows the implementation of this idea: first to read link
target and show it in "tree" view _without_ hyperlink, then
introduction of generic "object" view which does the verification and
redirect to correct view accorting to the type of object, and last
show link target hyperlinked in "tree" view using "object" view/action
link.

While at it implement the same "lazy" solution in commitsha1 commitag
in format_log_line_html subroutine.

Table of contents:
 [PATCH 1/3] gitweb: Show target of symbolic link in "tree" view
 [PATCH 2/3] gitweb: Add generic git_object subroutine to display object of any type
 [PATCH 3/3] gitweb: Hyperlink target of symbolic link in "tree" view (if possible)
 [PATCH/RFC 4/3] gitweb: SHA-1 in commit log message links to "object" view

Diffstat:
 gitweb/gitweb.perl |  152 ++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 137 insertions(+), 15 deletions(-)

-- 
Jakub Narebski
ShadeHawk on #git

  parent reply	other threads:[~2006-12-10 12:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 18:26 [PATCH] gitweb: Better symbolic link support in "tree" view Jakub Narebsmi
2006-12-05  1:08 ` Junio C Hamano
2006-12-05 21:27   ` Jakub Narebski
2006-12-05 22:34     ` Junio C Hamano
2006-12-05 23:06       ` Jakub Narebski
2006-12-10 12:25       ` Jakub Narebski [this message]
2006-12-10 12:25       ` [PATCH 0/3] " Jakub Narebski
2006-12-10 12:25       ` [PATCH 1/3] gitweb: Show target of symbolic link " Jakub Narebski
2006-12-10 12:25       ` [PATCH 2/3] gitweb: Add generic git_object subroutine to display object of any type Jakub Narebski
2006-12-10 12:25       ` [PATCH 3/3] gitweb: Hyperlink target of symbolic link in "tree" view (if possible) Jakub Narebski
2006-12-10 12:25       ` [PATCH/RFC 4/3] gitweb: SHA-1 in commit log message links to "object" view Jakub Narebski
2006-12-10 21:29         ` Junio C Hamano

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=11657535491406-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).