[PATCH] gitweb: "raw" links to blobs at HEAD

DORMANTno replies

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] gitweb: "raw" links to blobs at HEAD

From: Luben Tuikov <hidden>
Date: 2016-06-15 22:42:41

Currently there is no HTML interface which references (or
can be externally referenced) to yield a _binary_ blob at
HEAD.  There is one for non-binary blobs, but none for
binary ones.

The reason is that "blob"/entry itself for non-binary
entries gives you the "Blob page" where you can click on
last link of the page path, but clicking on the binary
entry/"blob" gives you the raw file.

Binary blobs:
  Since "raw" == the entry itself, we can eliminate this
redundancy and set "raw" to the binary blob at HEAD. This
patch implements that.  If the user wants the binary blob at
hash/hash_base then they can click on the entry itself.

Non-binary blobs:
  With this patch "raw" yields the HEAD revision as per the
above comment for binary blobs.  If the raw output of the
hash/hash_base blob is required the user can click on the entry
(same as for binary only) and then click on "raw" (which
used to be named "plain" not so long ago) or last entry of
"page" path.

Compare the "raw" link for non-binary blobs from tree view,
to the alternative to getting it: click on entry->HEAD->last
entry of "page" path.

Signed-off-by: Luben Tuikov <redacted>
---
 gitweb/gitweb.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH] gitweb: "raw" links to blobs at HEAD

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:41

Luben Tuikov wrote:
Currently there is no HTML interface which references (or
can be externally referenced) to yield a _binary_ blob at
HEAD.  There is one for non-binary blobs, but none for
binary ones.
You can in the same number of steps. First go to _tree_
at head, then click on "raw" link.

It's true that decision that binary files are automatically
redirected to "plain" ("raw") format, so they don't have "html"
output caused that there is no link for binary blob at head.
But I don't think that changing "raw" link to link to HEAD
version, while all other links are to current version is
a good idea...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

Re: [PATCH] gitweb: "raw" links to blobs at HEAD

From: Luben Tuikov <hidden>
Date: 2016-06-15 22:42:41

--- Jakub Narebski <jnareb@gmail.com> wrote:
Luben Tuikov wrote:
quoted
Currently there is no HTML interface which references (or
can be externally referenced) to yield a _binary_ blob at
HEAD.  There is one for non-binary blobs, but none for
binary ones.
You can in the same number of steps. First go to _tree_
at head, then click on "raw" link.
Jakub,

For binary only files, there is no HTML interface to refer
to, such that, hb=HEAD for _binary_ only files.  Unless of course
one types that on the URL line manually.

That is, I'd like to externally reference binary only blobs
at "HEAD", s.t. no matter _when_ the reference is used, it would
refer to the latest "version" of that file.

E.g. a PDF spec file.

My recent patches on the subject enable this capability.

    Luben
It's true that decision that binary files are automatically
redirected to "plain" ("raw") format, so they don't have "html"
output caused that there is no link for binary blob at head.
But I don't think that changing "raw" link to link to HEAD
version, while all other links are to current version is
a good idea...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help