aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xag4
1 files 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