From: mkoegler@auto.tuwien.ac.at (Martin Koegler)
To: Jakub Narebski <jnareb@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC] More diff possibilities in gitweb
Date: Sun, 18 Mar 2007 16:02:16 +0100 [thread overview]
Message-ID: <20070318150216.GB9607@auto.tuwien.ac.at> (raw)
In-Reply-To: <ethnog$cf6$1@sea.gmane.org>
On Sat, Mar 17, 2007 at 10:51:51PM +0100, Jakub Narebski wrote:
> Martin Koegler wrote:
>
> > The whole is implemented in JavaScript on the client side (tested with
> > IE 6 and Mozilla). On the server side, only the JavaScript file is
> > included in the output (see below).
>
> I'd rather not use JavaScript for that, but perhaps add in the history
> view (shortlog, history) selectbox to select commits (for shortlog, and
> history of a directory) or versions of a blob/file (history of a file)
> like in an "info" view e.g. in MoinMoin wiki:
> http://git.or.cz/gitwiki/GitSurvey?action=info
> JavaScript can be used to beautify this like e.g. MediaWiki engine
> does:
> http://en.wikipedia.org/w/index.php?title=Darcs&action=history
> (to allow selection of diff only in forward direction).
Let's focus on the UI first:
Using a select box, as shown above, exposes only a small part of all
possible combinations, eg. how to compare commits on different
branches.
In my solution, I add to each link to a compareable object (commit,
tree, blob) two new link, eg: link "commit" becomes "commit (base |
diff)". "base" stores the ID of the object in a cookie. "diff"
retrieves the cookie and compares it with it's associated object.
Currently, only few combinations are implemented. Future version could
integrate tags (as an tag links to one commit). Additionally,
comparing tags/commits with a tree could be enabled, as a tag/commit
link to one tree.
Storing the base object in a cookie enables the user to use multiple
windows/tabs showing, eg. different branches. He can select in on
window the base object, switch to an other window, where he selects
the diff option. He can also go back in the browser history, without
losing his selection.
Any sugesstions, how the UI can be improved or designed better?
To the implementation:
The whole thing can be implemented without any JavaScript on the
server side. For an out of tree implementation, my prototype is
simpler to maintain, as it needs only a few small changes to gitweb.
If there is an interesst in this feature (and nobody opposes including
it), I can reimplement it in perl.
I would do it in the following way:
1) introduce git_treediff
2) Add the generation of a base and diff link to each object
3) If a base link is selected, the server sends a Set-Cookie header
and redirects to the page, where it came from. So maybe the broser can
fetch the page out of its cash in some situation.
4) If a diff link is selected, based on the base object in the cookie,
the url to do the diff and redirects the browser to it. This should
simplify caching.
If depending on cookies is a problem for some out there, the base
object can be passed in the URLs as fallback. It would require, that
the select base object is included in every link, which gitweb
generates.
mfg Martin Kögler
next prev parent reply other threads:[~2007-03-18 15:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-17 15:17 [RFC] More diff possibilities in gitweb Martin Koegler
2007-03-17 18:04 ` Johannes Schindelin
2007-03-18 14:14 ` Martin Koegler
2007-03-18 23:20 ` Jakub Narebski
2007-03-19 22:03 ` Martin Koegler
2007-03-20 1:41 ` Jakub Narebski
2007-03-17 21:51 ` Jakub Narebski
2007-03-18 15:02 ` Martin Koegler [this message]
2007-03-18 21:55 ` Jakub Narebski
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=20070318150216.GB9607@auto.tuwien.ac.at \
--to=mkoegler@auto.tuwien.ac.at \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/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).