Merge pull request #3202 from yichengq/fix-etcdctl-watch

etcdctl: fix watch -after-index parsing
This commit is contained in:
Yicheng Qin 2015-07-31 14:41:45 -07:00
commit 8bd9554338

View File

@ -49,10 +49,7 @@ func watchCommandFunc(c *cli.Context, ki client.KeysAPI) {
key := c.Args()[0]
recursive := c.Bool("recursive")
forever := c.Bool("forever")
index := 0
if c.Int("after-index") != 0 {
index = c.Int("after-index") + 1
}
index := c.Int("after-index")
stop := false
w := ki.Watcher(key, &client.WatcherOptions{AfterIndex: uint64(index), Recursive: recursive})