composer/composer — pull request #3119 by garoevans (2014-07-11 11:35:48+00:00)
Title: Determine auth URLs more intelligently

When dealing with non-github repos that failed authentication's possible to get badly formed URLs after setting username/password.

Take the URL `http://garoevans@example.com/vendor/package.git` for example.

After adding a username password composer tries to clone from `http://garoevans:**********@garoevans@example.com/vendor/package.git`

The changes strip any auth details from the start of the URL and set the found username as the default if one isn't set.