On Sat, Jul 09, 2005 at 03:09:02PM -0600, Eric W. Biederman wrote:
> The current intelligent fetch currently has a problem that it cannot
> be used to bootstrap a repository.  If you don't have an ancestor
> of what you are fetching you can't fetch it.
> 

Not sure if this is what you want, but you could use the
following gitweb patch (to be applied on top of my previous
patches) to get a git tree snapshot for bootstrapping.

http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary
http://www.liacs.nl/~sverdool/gitweb.git/

skimo
--
Support pack snapshots.

---
commit f76a442a0e2166b3f17db0e496545a600a33f94c
tree f8f089ab738864e69e0155b10262dbec832b4a11
parent 8392280de17a89a451c1f7db4e268f2047d4aa83
author Sven Verdoolaege <[EMAIL PROTECTED]> Sun, 10 Jul 2005 23:56:42 +0200
committer Sven Verdoolaege <[EMAIL PROTECTED]> Sun, 10 Jul 2005 23:56:42 +0200

 gitweb.cgi |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gitweb.cgi b/gitweb.cgi
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -2058,8 +2058,9 @@ sub git_snapshot {
              "<th></th>\n" .
              "</tr>\n";
        my %types = (
-               'Bzipped tar archive' => 'tar.bz2',
-               'Gzipped tar archive' => 'tar.gz',
+               'Source tree (bzipped tar archive)' => 'tar.bz2',
+               'Source tree (gzipped tar archive)' => 'tar.gz',
+               'Git tree (pack file)' => 'pack',
        );
        my $alternate = 0;
        for my $type (sort keys %types) {
@@ -2094,6 +2095,7 @@ sub git_serve_snapshot {
        my %info = (
                'tar.bz2' => [ 'application/x-bzip2', 'bzip2' ],
                'tar.gz' => [ 'application/x-gzip', 'gzip' ],
+               'pack' => [ 'application/x-git-pack' ],
        );
        if (!exists $info{$st}) {
                die_error(undef, "Unknown snapshot type.");
@@ -2101,7 +2103,10 @@ sub git_serve_snapshot {
        my ($type, $zip) = @{$info{$st}};
        print $cgi->header(-type => $type, 
                           -attachment => "$project-$hash.$st");
-       open my $fd, "-|", "$gitbin/git-tar-tree $hash '$project-$hash' | $zip" 
+       open my $fd, "-|", ($st eq 'pack' ?
+               "$gitbin/git-rev-list --max-count=1 --objects $hash | ". 
+                       "$gitbin/git-pack-objects --stdout" :
+               "$gitbin/git-tar-tree $hash '$project-$hash' | $zip")
                or return;
        undef $/;
        print <$fd>;
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to