[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201110142137.JEJ69242.FLSVFQJtFMOOOH@I-love.SAKURA.ne.jp>
Date: Fri, 14 Oct 2011 21:37:43 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: linux-kernel@...r.kernel.org
Cc: gitster@...ox.com
Subject: [Git] partial downloading feature
Hello.
Is there any chance to add support for "[path...]" argument of git-archive
command to gitweb.cgi interface (something like below untested patch) ?
I sometimes download kernel source from snapshot links on
http://git.kernel.org/?p=linux/kernel/git/next/linux-next-history.git;a=summary
but I don't need 100MB tarball when wanting to download a single subdirectory.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 85d64b2..aedf11e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -754,6 +754,7 @@ our @cgi_param_mapping = (
searchtext => "s",
searchtype => "st",
snapshot_format => "sf",
+ snapshot_subdir => "ss",
extra_options => "opt",
search_use_regexp => "sr",
ctag => "by_tag",
@@ -6681,7 +6682,7 @@ sub git_snapshot {
my $cmd = quote_command(
git_cmd(), 'archive',
"--format=$known_snapshot_formats{$format}{'format'}",
- "--prefix=$prefix/", $hash);
+ "--prefix=$prefix/", $hash, $snapshot_subdir);
if (exists $known_snapshot_formats{$format}{'compressor'}) {
$cmd .= ' | ' . quote_command(@{$known_snapshot_formats{$format}{'compressor'}});
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists