#975607 libgit2-28: relative paths in alternates mishandled when nested

Package:
libgit2-28
Source:
libgit2
Submitter:
Eric Wong
Date:
2020-11-24 13:45:03 UTC
Severity:
normal
Tags:
#975607#5
Date:
2020-11-24 00:20:21 UTC
From:
To:
Dear Maintainer,

I've noticed libgit2 fails to handle relative paths for
alternates properly when a relative path is nested from
within another alternate.  Regular git(1) works fine
(as shown in the attached script).

I initially hit this in some Inline::C (Perl) code, but the Ruby
"rugged" library hits it, too.

I've attached a small Ruby script which reliably reproduces it
with the "ruby-rugged" gem.  I chose Ruby for this bug report
since I expect libgit2 maintainers to be familiar with it.

More detailed info is in the comments of the attached script.

This also affects libgit2-27 (0.27.7+dfsg.1-0.2) in buster in
addition to buster-backports.

This is an upstream bug, please forward as appropriate.

I will never use the upstream GitHub bug tracker due to their
Terms-of-Service, JavaScript CAPTCHA requirement, and it being
non-free software.

Thank you.

#975607#10
Date:
2020-11-24 13:43:00 UTC
From:
To:
Hi Eric,
I've forwarded the bug upstream: https://github.com/libgit2/libgit2/issues/5711

As soon as we have a fix available for this, I'll be happy to backport this :)



- u