commit b489feef9bce7a00c15b1d174565ec7a701a9b49
parent c77d5e6acadea39f130972726fbdd7f31ca23d47
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sun, 17 Sep 2017 17:15:15 -0400
remote: allow repository names shorter than 3 characters
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/remote.cpp b/src/remote.cpp
@@ -33,9 +33,9 @@ static bool validateName(const string &name)
using namespace std::regex_constants;
// see https://en.wikipedia.org/wiki/Filename#Reserved%5Fcharacters%5Fand%5Fwords
- static const regex validPattern("[^*\\\\:<>?/|\"[:cntrl:]]{3,}");
+ static const regex validPattern("[^*\\\\:<>?/|\"[:cntrl:]]+");
static const regex invalidPattern(
- "[\\.\x20].+|.+[\\.\x20]|CLOCK\\$|COM\\d|LPT\\d", icase);
+ "[\\.\x20].*|.+[\\.\x20]|CLOCK\\$|COM\\d|LPT\\d", icase);
smatch valid, invalid;
regex_match(name, valid, validPattern);