commit af740ad1af19a464f15aecb2345c260f3e8a79d3
parent 0571fe351d16c70bde876dc5aeff548224711f1d
Author: cfillion <cfillion@users.noreply.github.com>
Date: Tue, 1 Aug 2017 20:23:12 -0400
remote: remove overzealous limit on repository names
This commit reverts 11cff4a2af1e820e66876a7acb5691a90f642e92
Diffstat:
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/browser.cpp b/src/browser.cpp
@@ -410,7 +410,7 @@ void Browser::fillPackageMenu(const Entry *entry, Menu &menu)
menu.setEnabled(!entry->test(ObsoleteFlag),
menu.addAction(AUTO_STR("About this &package"), ACTION_ABOUT_PKG));
- auto_char aboutLabel[35];
+ auto_char aboutLabel[64];
const auto_string &name = make_autostring(getValue(RemoteColumn, *entry));
auto_snprintf(aboutLabel, auto_size(aboutLabel),
AUTO_STR("&About %s..."), name.c_str());
diff --git a/src/manager.cpp b/src/manager.cpp
@@ -240,7 +240,7 @@ bool Manager::fillContextMenu(Menu &menu, const int index) const
menu.addSeparator();
- auto_char aboutLabel[35];
+ auto_char aboutLabel[64];
const auto_string &name = make_autostring(remote.name());
auto_snprintf(aboutLabel, auto_size(aboutLabel),
AUTO_STR("&About %s..."), name.c_str());
diff --git a/src/remote.cpp b/src/remote.cpp
@@ -33,7 +33,7 @@ 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:]]{4,24}");
+ static const regex validPattern("[^*\\\\:<>?/|\"[:cntrl:]]{3,}");
static const regex invalidPattern(
"[\\.\x20].+|.+[\\.\x20]|CLOCK\\$|COM\\d|LPT\\d", icase);
diff --git a/test/remote.cpp b/test/remote.cpp
@@ -299,6 +299,6 @@ TEST_CASE("remove two remotes", M) {
}
TEST_CASE("compare remotes", M) {
- REQUIRE(Remote("aaaa", "aaaa") < Remote("bbbb", "aaaa"));
- REQUIRE_FALSE(Remote("aaaa", "aaaa") < Remote("aaaa", "bbbb"));
+ REQUIRE(Remote("aaa", "aaa") < Remote("bbb", "aaa"));
+ REQUIRE_FALSE(Remote("aaa", "aaa") < Remote("aaa", "bbb"));
}