git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar" <aneesh.kumar@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: gitweb: Support for snapshots in gitweb
Date: Thu, 17 Aug 2006 13:18:22 +0530	[thread overview]
Message-ID: <cc723f590608170048y44737ab3h497fb22db8605027@mail.gmail.com> (raw)
In-Reply-To: <7vhd0bu873.fsf@assigned-by-dhcp.cox.net>

On 8/17/06, Junio C Hamano <junkio@cox.net> wrote:
> "Aneesh Kumar K.V" <aneesh.kumar@gmail.com> writes:
>
> > @@ -2097,6 +2102,23 @@ sub git_tree {
> >       git_footer_html();
> >  }
> >
> > +sub git_snapshot {
> > +     if (!defined $hash) {
> > +             $hash = git_get_head_hash($project);
> > +     }
> > +     print $cgi->header(-type=>'application/x-tar', -Content-Encoding=>'x-gzip',
> > +             '-content-disposition' => "inline; filename=\"$project.tar.gz\"",
> > +             -status=> '200 OK');
>
> These -Mixed-Case, '-sometimes-quoted', spaces sometimes around
> double-arrow sometimes missing, parameters bother me.  Perhaps:
>
>         print $cgi->header(-type => 'application/x-tar',
>                            -content-encoding => 'x-gzip',
>                            -content-disposition =>
>                                "inline; filename=\"$project.tar.gz\"",
>                            -status => '200 OK');
>
> RFC 2616 says that "gzip" content-coding is registered with
> IANA, so I do not think you need to say "x-gzip".
>

Please feel free to change the code. Or if you want me to send another
patch with the changes suggested i can do the same. Let me know.



> > +     open my $fd, "-|", "$GIT tar-tree $hash \'$project\' | gzip -c6" or die_error(undef, "Execute git-tar-tree failed.");
>
> I think this "6" is because somebody suggested to use the
> default "6" instead of "9" in your original and the suggestion
> was because "9" tends to be too expensive.
>
> But if we do not have a good, specific, reason to use "6" (as
> opposed to, say, "5" or "7") and have "6" here only because we
> happen to know "6" is the current gzip default, then probably we
> are better off just letting gzip decide what compression level
> to use without specifying it ourselves?


yes that is correct. I  changed it because it was suggested.

-aneesh

  reply	other threads:[~2006-08-17  7:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-16  0:16 gitweb / cg-export Toby White
2006-08-16  0:23 ` gitweb / cg-export - corrected patch Toby White
2006-08-16  9:54 ` gitweb / cg-export Jakub Narebski
2006-08-16 10:53   ` Aneesh Kumar K.V
2006-08-16 11:32     ` Aneesh Kumar K.V
2006-08-16 20:05       ` Fredrik Kuivinen
2006-08-16 18:01     ` Junio C Hamano
2006-08-17  6:29       ` gitweb: Support for snapshots in gitweb Aneesh Kumar K.V
2006-08-17  7:34         ` Junio C Hamano
2006-08-17  7:48           ` Aneesh Kumar [this message]
2006-08-17  9:49         ` Jakub Narebski
2006-08-16 22:40     ` gitweb / cg-export Martin Waitz
2006-08-16 22:50       ` Kay Sievers

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=cc723f590608170048y44737ab3h497fb22db8605027@mail.gmail.com \
    --to=aneesh.kumar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).