call ui.updateopts only after changing directories
This corrects --config paths.foo=bar when it's used with --cwd
abort: repository a not found!255abort: error: Connection refused255abort: repository a not found!255abort: destination '../a' already exists255abort: repository a not found!255abort: destination 'q' already exists