]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/V2Writable.pm
v2writable: remove unnecessary skeleton commit
[public-inbox.git] / lib / PublicInbox / V2Writable.pm
index caabc8e4a885f660a5e31d982f3ef3796491a027..3bcea37defde1f588f96066259e7dc87cb6b9e73 100644 (file)
@@ -69,8 +69,7 @@ sub add {
        my $im = $self->importer;
        my $cmt = $im->add($mime);
        $cmt = $im->get_mark($cmt);
-       my $oid = $im->{last_object_id};
-       my ($len, $msgref) = @{$im->{last_object}};
+       my ($oid, $len, $msgref) = @{$im->{last_object}};
 
        my $nparts = $self->{partitions};
        my $part = $num % $nparts;
@@ -230,7 +229,6 @@ sub searchidx_checkpoint {
                if ($more) {
                        $dbh->begin_work;
                } else {
-                       $skel->remote_commit; # XXX should be unnecessary...
                        $skel->remote_close;
                        delete $self->{skel};
                }
@@ -245,16 +243,20 @@ sub git_init {
        die "$git_dir exists\n" if -e $git_dir;
        my @cmd = (qw(git init --bare -q), $git_dir);
        PublicInbox::Import::run_die(\@cmd);
-       @cmd = (qw/git config/, "--file=$git_dir/config",
-                       'repack.writeBitmaps', 'true');
-       PublicInbox::Import::run_die(\@cmd);
 
        my $all = "$self->{-inbox}->{mainrepo}/all.git";
        unless (-d $all) {
                @cmd = (qw(git init --bare -q), $all);
                PublicInbox::Import::run_die(\@cmd);
+               @cmd = (qw/git config/, "--file=$all/config",
+                               'repack.writeBitmaps', 'true');
+               PublicInbox::Import::run_die(\@cmd);
        }
 
+       @cmd = (qw/git config/, "--file=$git_dir/config",
+                       'include.path', '../../all.git/config');
+       PublicInbox::Import::run_die(\@cmd);
+
        my $alt = "$all/objects/info/alternates";
        my $new_obj_dir = "../../git/$new.git/objects";
        my %alts;
@@ -318,7 +320,7 @@ sub import_init {
        my ($self, $git, $packed_bytes) = @_;
        my $im = PublicInbox::Import->new($git, undef, undef, $self->{-inbox});
        $im->{bytes_added} = int($packed_bytes / $PACKING_FACTOR);
-       $im->{want_object_id} = 1;
+       $im->{want_object_info} = 1;
        $im->{ssoma_lock} = 0;
        $im->{path_type} = 'v2';
        $self->{im} = $im;