git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add "raw" output option to blobs in "tree" view format

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Jul 7, 2006, 16:41 UTC
Message-ID
<20060707164152.86022.qmail@web31805.mail.mud.yahoo.com>
In-Reply-To
<7vmzbl3nqj.fsf@assigned-by-dhcp.cox.net>
--- Junio C Hamano <junkio@cox.net> wrote:
Show 11 quoted lines
> Luben Tuikov <ltuikov@yahoo.com> writes:
> 
> > Add a "raw" output option to blobs in "tree" view format, so that the
> > user doesn't have to click on "blob", wait for the (binary) file to be
> > uploaded and shown in "blob" mode, and then click on "plain" to
> > download the (binary) file.
> 
> I appreciate what you are trying to achieve, but at the same
> time wonder if it would make more sense to simply teach a=blob
> action to do this automatically, perhaps using /etc/mime.types
> and/or File::MMagic.

That'd be cool for non-"text/*" files, but it would leave the user go through the same click "tree->blob->plain" for "text/*" files, since they are "cat -n"-able and the default action would be git_blob() if such an algorithm is implemented.

That is, the user would still have to click through "tree->blob->plain" to download a "text/*" file, as opposed to just "tree->raw".

What this patch allows, is that the user be able to simply download the file, right from "tree" view, regardless of the type of file. (I.e. the type of file as decided by the _user_, not gitweb.cgi.)

Having said that, we can still implement it, so that "raw"="blob" for non-"text/*" files, but "raw"!="blob" for "text/*" files. I.e. allow the "cat -n" functionality for "text/*" files, as is currently implemented, as well as shortcut for downloading ("raw").

Show 10 quoted lines
> If you know your MUA will mangle whitespace to make your patch
> inapplicable, please do not add a patch to the message _and_
> attach the patch to the message.  The mail-acceptance tools know
> how to flatten MIME attachments, but if you have your log,
> three-dash and then corrupt patch in the cover-letter part, and
> then the true patch in the attachment part, the flattened result
> will have the corrupt patch first to cause the patch application
> to fail.  So please either (preferably) use a MUA that does not
> corrupt your patches, or do a log in the message part with patch
> only as attachment.
Will do.
    Luben
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Add "raw" output option to blobs in "tree" view format”
  1. Add "raw" output option to blobs in "tree" view formatLuben Tuikov, Jul 7, 2006
  2. Junio C HamanoJul 7, 2006
  3. Luben TuikovJul 7, 2006
  4. Junio C HamanoJul 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.