From: Junio C Hamano <junkio@cox.net>
To: ltuikov@yahoo.com
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb.cgi: Teach tree->raw to not require the hash of the blob
Date: Thu, 13 Jul 2006 22:49:06 -0700 [thread overview]
Message-ID: <7vhd1kspm5.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060712175220.73131.qmail@web31813.mail.mud.yahoo.com> (Luben Tuikov's message of "Wed, 12 Jul 2006 10:52:20 -0700 (PDT)")
Luben Tuikov <ltuikov@yahoo.com> writes:
>> I think _allowing_ to accept filename not hash is a sane change,
>> and would be useful if you want to allow linking to always the
>> HEAD version from external sites,
>
> Indeed, it is useful.
>
>> but I do not think listing the
>> raw link in the tree view without the hash is a good idea. It
>> makes things quite confusing that "blob" link in its
>> neighbourhood gives the blob from that specific version, but
>> "raw" gives the version from HEAD, even when you are browsing
>> something other than HEAD.
>
> I just thought it to be an easy place to put the "raw"-no-hash
> link.
>
> BTW, Junio, it would be a shame to lose this capability. How
> would you like to proceed with this? Where would you like to
> see this kind of link go?
My preference?
Allowing to link the HEAD version from an _external_ source is
useful (i.e. you can put a link in gitwiki to point at a file
and say "the latest is always available at this URL").
We already support these:
a=blob&f=README
a=blob&f=README&hb=HEAD
a=blob&f=README&hb=HEAD~20
but not these:
a=blob_plain&f=README
a=blob_plain&f=t/test4012.png
The last example that does not generate text is less of a
problem, thanks to your previous patch, because "sub git_blob"
supports the "filename with or without hash base" syntax and
sends the correct hash to git_blob_plain to fall back, but that
does not help for text files. This patch corrects that, which
is nice.
However, I do not think the change to "sub git_tree" makes much
sense. The links within gitweb-generated pages are about
browsing the history. As I already said, having <blob> link
that is history specific and <raw> link which is not (iow always
goes to HEAD) next to each other is confusing, and you are
making it less easy to get a raw output from a specific version
because you removed that feature from the link and replaced it
with something less useful.
If somebody wants to see what the latest version of a blob looks
like while browsing the history with gitweb, I think it is a
more natural workflow to go to <history> link and find the
latest version. So maybe you might want to add <raw> link in
the output of the history action?
Side note: right now, <history> link does not show any
history newer than the commit that has the link itself;
maybe there is a room for improvement there but we need
to be careful not to trash the webserver caching.
Obviously you could go back to the repository top page and start
digging the latest tree from the top, but that is a bit more
cumbersome.
next prev parent reply other threads:[~2006-07-14 5:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 3:43 [PATCH] gitweb.cgi: Teach tree->raw to not require the hash of the blob Luben Tuikov
2006-07-12 6:16 ` Junio C Hamano
2006-07-12 8:32 ` Jakub Narebski
2006-07-12 18:02 ` Luben Tuikov
2006-07-12 18:12 ` Jakub Narebski
2006-07-12 17:52 ` Luben Tuikov
2006-07-14 5:49 ` Junio C Hamano [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-13 3:31 Luben Tuikov
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=7vhd1kspm5.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=ltuikov@yahoo.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).