commit: 5d0ec26faceeefe3ce97393cc28dd23c7b67243b
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 25 23:39:54 2015 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Feb 25 23:39:54 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=5d0ec26f
Document that this deletes the index normally.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
---
ag | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ag b/ag
index 5375461..b031363 100755
--- a/ag
+++ b/ag
@@ -32,7 +32,7 @@ $options.argmode = nil
op = OptionParser.new do |opts|
opts.banner = "Usage: ag
<<--index-full|--index-new|--delete-msg|--delete-index|--reindex|--rethread|--info>
<--list listname>> <[--file|--msgid|--hash] <maildir/file/hash/messageid>>
[options]"
- opts.on('--index-full', 'Read the full past archive from Maildir/cur. Needs
--list and a Maildir') do
+ opts.on('--index-full', 'Read the full past archive from Maildir/cur. Does
--delete-index by default. Needs --list and a Maildir') do
abort 'Can only select one action' if $options.action != nil
$options.action = :do_full
@@ -155,7 +155,7 @@ Ag::Utils.proc_count = $options.jobs
def do_full
abort "Wrong argument type: #{$options.argmode.to_s}" unless
$options.argmode == :dir
begin
- Ag::Storage.delete_index($options.name)
+ Ag::Storage.delete_index($options.name) unless $options.readonly
rescue Elasticsearch::Transport::Transport::Errors::NotFound => e
$stderr.puts "Index did not exist yet. Creating." if $options.debug
end