X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLEI.pm;h=148a5b1e530d00e0ab73d02aa0f214532d28ac0b;hb=9d0f17840479508de4aaf76fe6c150e94a9f79c3;hp=f62e82dc234e364d37df5642b48bb8a74d619139;hpb=7df294d19a7d8b2a35532375e75c8a879840dd04;p=public-inbox.git diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index f62e82dc..148a5b1e 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -214,7 +214,7 @@ our %CMD = ( # sorted in order of importance/use: 'ls-mail-sync' => [ '[FILTER]', 'list mail sync folders', qw(z|0 globoff|g invert-match|v local remote), @c_opt ], 'ls-mail-source' => [ 'URL', 'list IMAP or NNTP mail source folders', - qw(z|0 ascii l url), @c_opt ], + qw(z|0 ascii l pretty url), @c_opt ], 'forget-external' => [ 'LOCATION...|--prune', 'exclude further results from a publicinbox|extindex', qw(prune), @c_opt ], @@ -278,7 +278,7 @@ our %CMD = ( # sorted in order of importance/use: 'config' => [ '[...]', sub { 'git-config(1) wrapper for '._config_path($_[0]); }, qw(config-file|system|global|file|f=s), # for conflict detection - qw(c=s@ C=s@), pass_through('git config') ], + qw(edit|e c=s@ C=s@), pass_through('git config') ], 'inspect' => [ 'ITEMS...|--stdin', 'inspect lei/store and/or local external', qw(stdin| pretty ascii dir=s), @c_opt ], @@ -627,7 +627,6 @@ sub workers_start { my $end = $lei->pkt_op_pair; my $ident = $wq->{-wq_ident} // "lei-$lei->{cmd} worker"; $flds->{lei} = $lei; - $wq->{-wq_nr_workers} //= $jobs; # lock, no incrementing $wq->wq_workers_start($ident, $jobs, $lei->oldset, $flds); delete $lei->{pkt_op_p}; my $op_c = delete $lei->{pkt_op_c}; @@ -871,14 +870,6 @@ sub _config { waitpid(spawn($cmd, \%env, \%rdr), 0); } -sub lei_config { - my ($self, @argv) = @_; - $self->{opt}->{'config-file'} and return fail $self, - "config file switches not supported by `lei config'"; - _config(@_); - x_it($self, $?) if $?; -} - sub lei_daemon_pid { puts shift, $$ } sub lei_daemon_kill { @@ -1505,4 +1496,12 @@ sub sto_done_request { $lei->err($@) if $@; } +sub cfg_dump ($$) { + my ($lei, $f) = @_; + my $ret = eval { PublicInbox::Config->git_config_dump($f, $lei->{2}) }; + return $ret if !$@; + $lei->err($@); + undef; +} + 1;