diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2016-12-08 15:23:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-08 11:11:57 -0800 |
commit | 109064a0313c8a7c337f37936077ef3c9171d7ce (patch) | |
tree | 2ce06fd8e0556048bf85c90e4eebd22a0baabcc2 /t | |
parent | t7004-tag: add version sort tests to show prerelease reordering issues (diff) | |
download | tgif-109064a0313c8a7c337f37936077ef3c9171d7ce.tar.xz |
versioncmp: pass full tagnames to swap_prereleases()
The swap_prereleases() helper function is responsible for finding
configured prerelease suffixes in a pair of tagnames to be compared,
but this function currently gets to see only the parts of those two
tagnames starting at the first different character. To fix some
issues related to the common part of two tagnames overlapping with
leading part of a prerelease suffix, this helper function must see
both full tagnames.
In preparation for the fix in the following patch, refactor
swap_prereleases() and its caller to pass two full tagnames and an
additional offset indicating the position of the first different
character.
While updating the comment describing that function, remove the
sentence about not dealing with both tagnames having the same suffix.
Currently it doesn't add much value (we know that there is a different
character, so it's obvious that it can't possibly be the same suffix
in both), and at the end of this patch series it won't even be true
anymore.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions