Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/ag:master commit in: /
Date: Wed, 25 Feb 2015 23:40:29
Message-Id: 1424907594.5d0ec26faceeefe3ce97393cc28dd23c7b67243b.robbat2@gentoo
1 commit: 5d0ec26faceeefe3ce97393cc28dd23c7b67243b
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 25 23:39:54 2015 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 25 23:39:54 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=5d0ec26f
7
8 Document that this deletes the index normally.
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 ---
13 ag | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16 diff --git a/ag b/ag
17 index 5375461..b031363 100755
18 --- a/ag
19 +++ b/ag
20 @@ -32,7 +32,7 @@ $options.argmode = nil
21 op = OptionParser.new do |opts|
22 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]"
23
24 - opts.on('--index-full', 'Read the full past archive from Maildir/cur. Needs --list and a Maildir') do
25 + opts.on('--index-full', 'Read the full past archive from Maildir/cur. Does --delete-index by default. Needs --list and a Maildir') do
26 abort 'Can only select one action' if $options.action != nil
27
28 $options.action = :do_full
29 @@ -155,7 +155,7 @@ Ag::Utils.proc_count = $options.jobs
30 def do_full
31 abort "Wrong argument type: #{$options.argmode.to_s}" unless $options.argmode == :dir
32 begin
33 - Ag::Storage.delete_index($options.name)
34 + Ag::Storage.delete_index($options.name) unless $options.readonly
35 rescue Elasticsearch::Transport::Transport::Errors::NotFound => e
36 $stderr.puts "Index did not exist yet. Creating." if $options.debug
37 end