Escape square bracket to avoid possible future trouble with Python 3+:
>>> re.compile(r'[[ ~^:?*\\]|\.\.|//|@{')
__main__:1: FutureWarning: Possible nested set at position 1
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
return x
-_some_invalid_save_parts_rx = re.compile(r'[[ ~^:?*\\]|\.\.|//|@{')
+_some_invalid_save_parts_rx = re.compile(r'[\[ ~^:?*\\]|\.\.|//|@{')
def valid_save_name(name):
# Enforce a superset of the restrictions in git-check-ref-format(1)