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
This commit is contained in:
Matthew Leeds
2019-07-21 19:51:42 -07:00
committed by Atomic Bot
parent f80cce6b8d
commit f09049b7aa

View File

@@ -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.