From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [RFC] gitweb wishlist and TODO list
Date: Sat, 2 Sep 2006 18:17:08 +0200 [thread overview]
Message-ID: <200609021817.09296.jnareb@gmail.com> (raw)
This is second series of planned gitweb features. Still ideas for many
of them come from xmms2's gitweb version, which can you see in work at
http://git.xmms.se/?p=gitweb-xmms2.git;a=summary
Some of gitweb features like snapshot support and clone/fetch URL were
implemented, some of cleanup like refactoring navbar generation or
putting CSS into separate style file too.
I have put the list here for three reasons. First to get input which
features are most wanted, and to receive perhaps ideas for new
features. Second, to have TODO list, and receive input if somebody is
doing implementing some of the features to avoid duplicate work. Third,
and most important, some of features needs discussion about _how_ to
implement them.
Copy sent to Sham Chukoury, owner of gitweb-xmms2.
Cleanup, tidying, refactoring:
* HTML code still needs cleanup. All elements should have be either
assigned class, or given unique id. Presentational elements like <i>
or <b> should be replaced by styling using CSS. Page should be divided
into block elements; avoid overuse of <br/>.
* CSS cleanup. Names of classes should reflect intent, not be
replacement for presentational elements, or be incomprehensive:
e.g. classes age0, age1, age2, dark, light. padding: 8px; repeats many
times, perhaps it could be replaced by setting margin in encompassing
element, or via inheritance or additional class.
* Separate generating link and related links to object
(e.g. "blob | blame | history | raw" for blob in "tree" view)
into subroutine, similarly to refactoring navbar. The problem is that
the set of links depends not only on the type of object, but also on
the action/view we are in, for example links to commit object might
be either "commit | commitdiff", or "log | shortlog" if the commit is
considered ref. DISCUSSION needed.
* Collapse similar subroutines into one, e.g. git_blob and
git_blob_plain, and use parameter to set format. Perhaps instead of
having
sub git_commitdiff_plain {
git_commitdiff('plain');
}
we can simply use
my %actions = (
# ...
"commitdiff_plain" => sub { git_commitdiff('plain'); }
# ...
);
Which of this options is more readable, which one is faster?
* Refactoring formatsnav similarly to commit/hashbase related main
navbar (upper part of navbar now). For blob it would be "html",
"plain", "blame", "head" (or "base"), optionally "HEAD", "history",
perhaps later "highlight". For tree it would be "tree", "blame" and
"history". For commit it would be "html", "plain", and "combined"
if applicable.
* Perhaps some of the views should be made into format, e.g. 'shortlog'
and 'log' (and perhaps 'rss') for log views (this includes
"log"/"shortlog" and "history" views), or 'html', 'opml' and
'plain'/'index' for "project_list". DISCUSSION encouraged.
* Things like description or cloneurls (repourls) and further category
should be perhaps available to set in repository config, not only from
additional files in repository.
Gitweb speed:
* Ensure that gitweb is compatibile with mod_perl not only in
Apache::Registry/ModPerl::Registry CGI script compatibility mode,
but also as native mod_perl handler/script. Make it easy to use
FastCGI instead of CGI (perhaps via CGI::Fast).
This could be ensured by creating 'handler'/'main' method which
does parameter reading, validation and dispatching action. Perhaps
we should add gitweb_params subroutine, which given the names
of parameters returns values of needed parameters (either as list of
parameter names and returning list of parameters in order set by
subroutine argument, or as hash with keys and undefined values and
returning hash or hashref with values filled). The exception being
project and action parameters, which must be accessed before
dispatching action.
We could make script options parameters my() again, and leave our()
only for global variables which changes from invocation to invocation,
like $project, $action, $git_dir etc.
* Add new CORE GIT command, git-show-refs, which returns for given
by glob set of refs required fields (specified by --format option),
sorted by given field (specified by --sort option). This would speed
up "tags" and "summary" views considerably.
See Junio post in "[PATCH/RFC] gitweb: Great subroutines renaming"
thread for proposed git-show-refs options.
http://permalink.gmane.org/gmane.comp.version-control.git/25055
Message-Id: <7vejvsyum8.fsf@assigned-by-dhcp.cox.net>
* Try to avoid unnecessary calls to git commands, try do do things
using one command. For example instead of getting list of revisions
from git-rev-list, then parsing commit after commit use one
git-rev-list invocation to get and parse list of revisions.
It would be easier if some CORE GIT commands, for example git-ls-tree,
acquired --stdin option, similarly to git-diff-tree (and output
revision before output for that revison, like git-diff-tree).
* In the future, use Git.pm
Improvements of existing views and features:
* Make pickaxe search a feature (as it is expensive), and document
existing search operators. Perhaps refactor git_search as well.
* Make history follow renames. This could I think be done without CORE
GIT support, but it would be better with it. The proposition is to add
--follow option to git-rev-list (or -C, -M, -B options), which would
make if follow renames in files in path limit; I think following
renames with pathspec being glob is out, unless we expand glob to
individual file names and then follow those, and that following
directory renames would be very hard if not impossible.
Additionally make git-rev-list output current path limit, in format
suitable as argument for other git commands like git-diff-tree, i.e.
<hash> -- <path limit>
instead of current
<hash>
Make git-diff-tree at least accept and understand this kind of input
also on stdin with --stdin option.
* Perhaps add number of changed lines to the short information about
blob (perhaps via title to patch/diff link?), and diffstat to
"commitdiff_plain" view.
* Parse $GIT_DIR/remotes/ to mark tracking branches in "heads" view,
e.g. as a popup.
New features:
* Categories support (from gitweb-xmms2), although I'm not sure about
adding yet another file "category" to git repository. Perhaps first
part of dirname could serve as category name, or we could use
gitweb.category configuration variable.
* Code highlighting in blob view (from gitweb-xmms2), or to generalize
to allow for generalized filter. The higlighter should have support
for HTML support, it should always close elements before end of line,
it would be better if it used CSS for styling, and it should accept
file to highlight on standard input. gitweb-xmms2 uses Highlight
http://www.andre-simon.de/
but GNU Highlight (src-hilite) could be used instead
http://www.gnu.org/software/src-highlite/
* Committags support, i.e. extend hyperlinking commit sha1 to commit
view to hyperlinking bug #nn/BUG(nn) to the proper bugtracker, in both
commit message view and (harder to do properly) in commit
title/subject line which is hyperlink itself. The problem is how to do
this general enough...
I have thought about structure somewhat similar to %feature hash, i.e.
something like %commitfilter hash, with 'enabled', 'override', 'name',
'options' or something like that and of course 'sub' (as we probably
would use $cgi->a(...) to construct hyperlink, and not simple regexp
replacement.
DISCUSSION needed.
* Etags/Ctags/LXR based anchors in the blob view. In gitweb-xmms2 they
use temporary file to avoid race condition for both etags and
highlighting. Is it worth doing? GNU Highlight has ctags
(encumberant-ctags) support built in, I don't know about Highlight.
New views:
* Reflog support: show history of branch. I'm not sure if it is worth
doing, as of now reflogs are local matter, and doesn't get copied on
push even to bare repository.
* ViewVC-like "tree_blame" view. It probably would need CORE GIT support
to have acceptable speed, although version using git-ls-tree wasn't
that slow. Or at least git-ls-tree with --stdin support.
* gitk-ish (qgit-ish) view, with graph showing branches forking and
merging. Not that easy, but probably possible.
In the future:
* AJAX-ize parts of gitweb.
Comments? Other ideas? <wishful thinking>Code?</wishful thinking>
--
Jakub Narebski
ShadeHawk on #git
Poland
--
VGER BF report: H 0
next reply other threads:[~2006-09-02 16:17 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-02 16:17 Jakub Narebski [this message]
2006-09-02 18:10 ` [RFC] gitweb wishlist and TODO list Marco Costalba
2006-09-02 19:29 ` Jakub Narebski
2006-09-03 4:26 ` Marco Costalba
2006-09-03 9:27 ` Jakub Narebski
2006-09-03 11:10 ` Marco Costalba
2006-09-03 11:24 ` Jakub Narebski
2006-09-08 0:44 ` Jakub Narebski
2006-09-08 1:16 ` Junio C Hamano
2006-09-08 9:11 ` Jakub Narebski
-- strict thread matches above, loose matches on Subject: below --
2008-09-25 10:30 Jakub Narebski
2008-09-25 11:08 ` Pedro Melo
2008-09-25 12:23 ` Jakub Narebski
2008-09-25 14:45 ` Pedro Melo
2008-09-25 21:23 ` Jakub Narebski
2008-09-25 13:19 ` Wincent Colaiuta
2008-09-25 13:33 ` Petr Baudis
2008-09-25 15:41 ` Jakub Narebski
2008-09-28 10:01 ` Jakub Narebski
2008-09-28 21:18 ` Petr Baudis
2008-10-01 8:40 ` Ask Bjørn Hansen
2008-04-25 13:14 Jakub Narebski
2006-10-09 12:49 Jakub Narebski
2006-10-10 1:47 ` Luben Tuikov
2006-10-10 8:54 ` Jakub Narebski
2006-10-11 5:52 ` Junio C Hamano
2006-10-11 9:20 ` Jakub Narebski
2006-10-12 10:03 ` Junio C Hamano
2006-10-13 19:55 ` Jakub Narebski
2006-10-11 15:09 ` Jakub Narebski
2006-10-11 23:05 ` Jakub Narebski
2006-09-03 11:52 Jakub Narebski
2006-09-03 12:18 ` Marco Costalba
2006-09-03 12:38 ` Jakub Narebski
2006-06-20 16:51 Jakub Narebski
2006-06-20 17:33 ` Carl Worth
2006-06-20 17:46 ` Jakub Narebski
2006-06-20 17:55 ` Petr Baudis
2006-06-20 18:34 ` Jakub Narebski
2006-06-20 18:40 ` Petr Baudis
2006-06-21 14:52 ` Jakub Narebski
2006-06-20 19:33 ` Martin Langhoff
2006-06-20 19:56 ` Jakub Narebski
2006-06-20 21:17 ` Martin Langhoff
2006-07-01 10:35 ` Paul Mackerras
2006-06-21 13:05 ` Dennis Stosberg
2006-06-21 13:30 ` Jakub Narebski
2006-06-22 10:00 ` Dennis Stosberg
2006-06-22 14:47 ` Ryan Anderson
2006-06-21 16:45 ` Ryan Anderson
2006-06-21 17:36 ` Jakub Narebski
2006-06-20 19:46 ` Junio C Hamano
2006-06-20 20:10 ` Petr Baudis
2006-06-20 20:59 ` Jakub Narebski
2006-06-20 21:25 ` Petr Baudis
2006-06-20 21:53 ` Thomas Glanzmann
2006-06-21 8:56 ` Josef Weidendorfer
2006-06-21 9:15 ` Jakub Narebski
2006-06-21 9:57 ` Josef Weidendorfer
2006-06-21 13:53 ` Jakub Narebski
[not found] ` <200606211802.41071.Josef.Weidendorfer@gmx.de>
2006-06-21 16:38 ` Jakub Narebski
2006-06-21 20:35 ` Josef Weidendorfer
2006-06-22 9:01 ` Jakub Narebski
2006-06-22 9:14 ` 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=200609021817.09296.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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).