No functional changes, yet, but this makes future changes
easier-to-read.
-public-inbox-index [OPTIONS] GIT_DIR
+public-inbox-index [OPTIONS] REPO_DIR
=head1 FILES
All public-inbox-specific files are contained within the
=head1 FILES
All public-inbox-specific files are contained within the
-C<$GIT_DIR/public-inbox/> directory. All files are expected to
+C<$REPO_DIR/public-inbox/> directory. All files are expected to
grow in size as more messages are archived, so using compaction
commands (e.g. L<xapian-compact(1)>) is not recommended unless
the list is no longer active.
=over
grow in size as more messages are archived, so using compaction
commands (e.g. L<xapian-compact(1)>) is not recommended unless
the list is no longer active.
=over
-=item $GIT_DIR/public-inbox/msgmap.sqlite3
+=item $REPO_DIR/public-inbox/msgmap.sqlite3
The stable NNTP article number to Message-ID mapping is
stored in an SQLite3 database.
The stable NNTP article number to Message-ID mapping is
stored in an SQLite3 database.
This file is relatively small, and typically less than 5%
of the space of the mail stored in a packed git repository.
This file is relatively small, and typically less than 5%
of the space of the mail stored in a packed git repository.
-=item $GIT_DIR/public-inbox/xapian*
+=item $REPO_DIR/public-inbox/xapian*
The database used by L<Search::Xapian>. This directory name is
followed by a number indicating the index schema version this
The database used by L<Search::Xapian>. This directory name is
followed by a number indicating the index schema version this
# Basic tool to create a Xapian search index for a git repository
# configured for public-inbox.
# Usage with libeatmydata <https://www.flamingspork.com/projects/libeatmydata/>
# Basic tool to create a Xapian search index for a git repository
# configured for public-inbox.
# Usage with libeatmydata <https://www.flamingspork.com/projects/libeatmydata/>
-# highly recommended: eatmydata public-inbox-index GIT_DIR
+# highly recommended: eatmydata public-inbox-index REPO_DIR
use strict;
use warnings;
use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
use Cwd 'abs_path';
use strict;
use warnings;
use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
use Cwd 'abs_path';
-my $usage = "public-inbox-index GIT_DIR";
+my $usage = "public-inbox-index REPO_DIR";
use PublicInbox::Config;
my $config = eval { PublicInbox::Config->new } || eval {
warn "public-inbox unconfigured for serving, indexing anyways...\n";
use PublicInbox::Config;
my $config = eval { PublicInbox::Config->new } || eval {
warn "public-inbox unconfigured for serving, indexing anyways...\n";
+ my $prefix = defined $cd ? $cd : './';
+
my @cmd = qw(git rev-parse --git-dir);
my $cmd = join(' ', @cmd);
my $pid = open my $fh, '-|';
my @cmd = qw(git rev-parse --git-dir);
my $cmd = join(' ', @cmd);
my $pid = open my $fh, '-|';
- @dirs = map { resolve_git_dir($_) } @ARGV;
+ @dirs = map { resolve_repo_dir($_) } @ARGV;
- @dirs = (resolve_git_dir());
+ @dirs = (resolve_repo_dir());
}
sub usage { print STDERR "Usage: $usage\n"; exit 1 }
}
sub usage { print STDERR "Usage: $usage\n"; exit 1 }