call ui.updateopts only after changing directories
This corrects --config paths.foo=bar when it's used with --cwd
abort: edit failed: false exited with status 1transaction abort!rollback completedabort: edit failed: false exited with status 1transaction abort!rollback completed