SSHGitClient doesn't support username expansion

Bug #1083439 reported by Eugene
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dulwich
Fix Released
Medium
Jelmer Vernooij

Bug Description

TCPGitClient has the following two lines for supporting URLs like ssh://host.xz/~user/repo:
        if path.startswith("/~"):
            path = path[1:]

git does something similar in connect.c:568.

These two lines should be added to the start of SSHGitClient._connect. Otherwise I can't clone my OpenShift git repository with the URL that they provide.

Thanks!
Eugene

Jelmer Vernooij (jelmer)
Changed in dulwich:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
milki (milki-p) wrote :

Implemented the suggested solution.

No tests made because I am not sure of how to emulate the behaviour and there is no existing test for TCPGitClient.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 1083439] Re: SSHGitClient doesn't support username expansion

On Thu, 2013-01-10 at 04:07 +0000, milki wrote:
> Implemented the suggested solution.
>
> No tests made because I am not sure of how to emulate the behaviour and
> there is no existing test for TCPGitClient.
>
> ** Patch added: "0001-Support-username-expansion-in-SSHGitClient.patch"
> https://bugs.launchpad.net/dulwich/+bug/1083439/+attachment/3478736/+files/0001-Support-username-expansion-in-SSHGitClient.patch
That looks reasonable to me - though a test would be really nice...

Cheers,

Jelmer

Revision history for this message
milki (milki-p) wrote :

I've attached a test that mocks SSHVendor. I made a fake class for the return value of connect_ssh to make _connect happy. I don't know if that should be done...

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Sat, 2013-01-19 at 05:26 +0000, milki wrote:
> I've attached a test that mocks SSHVendor. I made a fake class for the
> return value of connect_ssh to make _connect happy. I don't know if that
> should be done...
>
> ** Patch added: "0002-Add-test_connect-for-SSHGitClient.patch"
> https://bugs.launchpad.net/dulwich/+bug/1083439/+attachment/3488408/+files/0002-Add-test_connect-for-SSHGitClient.patch
>
Thanks for the patches. I've been really distracted with other things
recently, but these are on my review queue.

Sorry for the delay.

Cheers,

Jelmer

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Merged, thanks.

Changed in dulwich:
status: Triaged → Fix Committed
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in dulwich:
milestone: none → 0.9.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.