Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-05 13:26:12 +0400
committerJunio C Hamano <junkio@cox.net>2006-10-05 13:26:12 +0400
commit9ccb64c8e0791a865ad520bcfff4b02cc7c50097 (patch)
tree0b1ac600d0f02a182bd546d6439716c5ace4469c /gitweb
parent6030649591256a8bc1b504ec1e4fce86ab0ad064 (diff)
tar-tree deprecation: we eat our own dog food.
It is silly to keep using git-tar-tree in dist target when the command gives a big deprecation warning when called. Instead, use "git-archive --format=tar" which we recommend to our users. Update gitweb's snapshot feature to use git-archive for the same reason. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3e9d4a0052..6e1496d6ac 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2838,9 +2838,12 @@ sub git_snapshot {
-content_disposition => 'inline; filename="' . "$filename" . '"',
-status => '200 OK');
- my $git_command = git_cmd_str();
- open my $fd, "-|", "$git_command tar-tree $hash \'$project\' | $command" or
- die_error(undef, "Execute git-tar-tree failed.");
+ my $git = git_cmd_str();
+ my $name = $project;
+ $name =~ s/\047/\047\\\047\047/g;
+ open my $fd, "-|",
+ "$git archive --format=tar --prefix=\'$name\'/ $hash | $command"
+ or die_error(undef, "Execute git-tar-tree failed.");
binmode STDOUT, ':raw';
print <$fd>;
binmode STDOUT, ':utf8'; # as set at the beginning of gitweb.cgi