Skip to content

Commit 269b7b6

Browse files
committed
Undo short-circuiting code in parse_version_number
1 parent b5babff commit 269b7b6

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

ext/version_sorter/version_sorter.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,24 +118,6 @@ parse_version_number(const char *string)
118118

119119
version = grow_version_number(version, comp_alloc);
120120

121-
// Does this input look like a version? e.g. "1.0", "1.2.3", "v1", "V1"
122-
int non_version = !(
123-
isdigit(string[0]) ||
124-
(
125-
(string[0] == 'v' || string[0] == 'V') && isdigit(string[1])
126-
)
127-
);
128-
129-
// If it does NOT look like a version, short-circuit to sort as a string
130-
if (non_version) {
131-
version->comp[0].string.offset = 0;
132-
version->comp[0].string.len = strlen(string);
133-
version->original = string;
134-
version->num_flags = num_flags;
135-
version->size = 1;
136-
return version;
137-
}
138-
139121
for (offset = 0; string[offset] && comp_n < 64;) {
140122
if (comp_n >= comp_alloc) {
141123
comp_alloc += 4;

0 commit comments

Comments
 (0)