mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 17:40:37 +00:00
Be more lenient with branch names.
Notably, the "foo@0/12345678" syntax was not allowed, because '/' is not a word character.
This commit is contained in:
@@ -697,7 +697,8 @@ impl Connection {
|
||||
|
||||
// branch_create <branchname> <startpoint>
|
||||
// TODO lazy static
|
||||
let re = Regex::new(r"^branch_create (\w+) ([\w@\\]+)[\r\n\s]*;?$").unwrap();
|
||||
// TOOD: escaping, to allow branch names with spaces
|
||||
let re = Regex::new(r"^branch_create (\S+) (\S+)[\r\n\s]*;?$").unwrap();
|
||||
let caps = re.captures(&query_str).ok_or_else(err)?;
|
||||
|
||||
let branchname: String = String::from(caps.get(1).ok_or_else(err)?.as_str());
|
||||
|
||||
2
vendor/postgres
vendored
2
vendor/postgres
vendored
Submodule vendor/postgres updated: 2a6c17f1e0...40465243d6
Reference in New Issue
Block a user