Re: [PATCH 1/2] git-svn: use platform specific auth providers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthijs Kooijman <matthijs@xxxxxxxx> wrote:
> Hi folks,
> 
> I could reproduce this problem (after installing half a dozen Ubuntue perl
> packages on my Debian system ;-p). It seems the problem is because the
> version comparison is wrong:
> 
>         if ($SVN::Core::VERSION gt '1.6.12') {
> 
> This does textual comparison, so 1.6.6 > 1.6.12. To do proper version
> comparison, I think the version numbers should be split into
> major/minor/revision and each be compared numerically.
> 
> This is not the only place where this comparison happens in this way,
> there are 6 more comparisons in this way, which would have to be fixed
> as well.

Ah, thanks for the analysis, we were lucky in the past that all version
components only had a single character.

> We could introduce a helper function for comparing version numbers by
> splitting and comparing the parts separately, but that might be hard to
> get right (especially when non-numeric version parts are involved).
> 
> An alternative would be to use the Sort::Versions perl module [1] for
> this, but that would add an external dependency.
> 
> I'd be happy to code and test both approaches, just let me know which
> would be preferred.

I think the former is preferable for git.  Sort::Versions isn't used
anywhere else in git and I don't think it's widely installed.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]