From f09049b7aa25af64e46ef67b30e950ee1cec4d01 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Sun, 21 Jul 2019 19:51:42 -0700 Subject: [PATCH] common: Fix branch validation docs The docs for flatpak_is_valid_branch() say branch names can't start with a digit but the implementation doesn't enforce this, and we have lots of branches out in the wild that start with a digit (e.g. "3.32" and "5.12"). So make the docs imply that branches can start with a digit. The implementation also disallows "." as the leading character for a branch, so add that to the docs. I'm just guessing that "." was intended to be disallowed but it makes sense; otherwise the file we create named with the branch would be hidden. Closes: #3023 Approved by: alexlarsson --- common/flatpak-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c index d9912e85..bb34ba20 100644 --- a/common/flatpak-utils.c +++ b/common/flatpak-utils.c @@ -999,7 +999,7 @@ is_valid_branch_character (gint c) * * Branch names must only contain the ASCII characters * "[A-Z][a-z][0-9]_-.". - * Branch names may not begin with a digit. + * Branch names may not begin with a period. * Branch names must contain at least one character. * * Returns: %TRUE if valid, %FALSE otherwise.