threads / discuss / 9219

rc3 gitweb is broken, won't deliver snapshots

Subject: rc3 gitweb is broken, won't deliver snapshots

## tl;dr

5 messages between Jul 25, 2007 and Jul 26, 2007.

replies: 4people: 3as markdown or json

Mark Levedahl· Jul 25, 2007, 13:27 UTC · lore

gitweb in 1.5.3-rc3 fails to deliver snapshots in any useable format (bzip2, gz, or zip). Clicking on a link seems to work, but the delivered file as stored on my system is empty. No error messages appear anywhere I can find. I am hosting gitweb on FC7 using lighttpd, if that matters.

The snapshot service at git.kernel.org also seems broken, I don't know what gitweb is running there so don't know if the issue is related.

I have fixed this for my use by reverting the following commits

3473e7df5f8c7f8dc3e2c3f2fdc99a1d1a719c16 gitweb: More detailed error messages for snapshot format a781785d8f1eb7adf05a24b121104716a086a67a gitweb: Fix support for legacy gitweb config for snapshots a3c8ab30a54c30a6a434760bedf04548425416ef gitweb: snapshot cleanups & support for offering multiple formats

The snapshot problem first appears when a3c8ab30a54 is applied.
Mark Levedahl
Jakub Narebski· Jul 25, 2007, 22:17 UTC · re: Mark Levedahl · lore

[PATCH] gitweb: Fix error in generating snapshot

There was an error while generating cmmandline to run git-archive: there were no whitespace between two options.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0acd0ca..b381692 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4343,7 +4343,7 @@ sub git_snapshot {
 	my $cmd;
 	$filename .= "-$hash$known_snapshot_formats{$format}{'suffix'}";
 	$cmd = "$git_command archive " .
-		"--format=$known_snapshot_formats{$format}{'format'}" .
+		"--format=$known_snapshot_formats{$format}{'format'} " .
 		"--prefix=\'$name\'/ $hash";
 	if (exists $known_snapshot_formats{$format}{'compressor'}) {
 		$cmd .= ' | ' . join ' ', @{$known_snapshot_formats{$format}{'compressor'}};
-- 
1.5.2.4
Jakub Narebski· Jul 26, 2007, 09:17 UTC · re: Jakub Narebski · lore

Re: [PATCH] gitweb: Fix error in generating snapshot

Jakub Narebski wrote:
> There was an error while generating cmmandline to run git-archive:
> there were no whitespace between two options.
> 
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Noticed-by: Mark Levedahl <mlevedahl@gmail.com>
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Junio C Hamano· Jul 25, 2007, 22:48 UTC · re: Mark Levedahl · lore

Re: rc3 gitweb is broken, won't deliver snapshots

"Mark Levedahl" <mlevedahl@gmail.com> writes:
Show 19 quoted lines
> gitweb in 1.5.3-rc3 fails to deliver snapshots in any useable format
> (bzip2, gz, or zip). Clicking on a link seems to work, but the
> delivered file as stored on my system is empty. No error messages
> appear anywhere I can find. I am hosting gitweb on FC7 using lighttpd,
> if that matters.
>
> The snapshot service at git.kernel.org also seems broken, I don't know
> what gitweb is running there so don't know if the issue is related.
>
> I have fixed this for my use by reverting the following commits
>
> 3473e7df5f8c7f8dc3e2c3f2fdc99a1d1a719c16 gitweb: More detailed error
> messages for snapshot format
> a781785d8f1eb7adf05a24b121104716a086a67a gitweb: Fix support for
> legacy gitweb config for snapshots
> a3c8ab30a54c30a6a434760bedf04548425416ef gitweb: snapshot cleanups &
> support for offering multiple formats
>
> The snapshot problem first appears when a3c8ab30a54 is applied.

True. I wonder if people who submitted patches even tested these things... Sigh.

---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0acd0ca..b381692 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4343,7 +4343,7 @@ sub git_snapshot {
 	my $cmd;
 	$filename .= "-$hash$known_snapshot_formats{$format}{'suffix'}";
 	$cmd = "$git_command archive " .
-		"--format=$known_snapshot_formats{$format}{'format'}" .
+		"--format=$known_snapshot_formats{$format}{'format'} " .
 		"--prefix=\'$name\'/ $hash";
 	if (exists $known_snapshot_formats{$format}{'compressor'}) {
 		$cmd .= ' | ' . join ' ', @{$known_snapshot_formats{$format}{'compressor'}};

← back to recent threads