dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Create server setting to auto-create branches on connect

Open zachmu opened this issue 4 years ago • 3 comments

Should be possible to connect to mydb/newBranch without creating that branch first.

zachmu avatar Dec 03 '21 18:12 zachmu

test-commit-diff $ mysql -h 127.0.0.1 --database='test_commit_diff/foo' -u root
ERROR 1105 (HY000): unknown error: database not found: test_commit_diff/foo
test-commit-diff $ mysql -h 127.0.0.1 --database='test_commit_diff/main' -u root
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.9-Vitess 

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

The first command should work and just create the foo branch off HEAD of default branch.

timsehn avatar Aug 30 '22 20:08 timsehn

Slight variation: should be possible to name a remote to automatically pull branches from on connection if they don't exist locally.

This is already the case for read replicas, but would be nice to support on normal clones as well.

zachmu avatar May 02 '23 19:05 zachmu