If the HEAD request fails, use a GET request to properly test if git
server is smart-http.
Signed-off-by: Andrew He <he.andrew.mail@gmail.com>
Upstream-commit: 85afbbc2ed36945adeaf6fa09f6066a549631a6f
Component: engine
This function was only used inside gitutils,
and is written specifically for the requirements
there.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d3d1aabcc68f65d40acbf1b3adc02d13997bb8e2
Component: engine
`docker build` accepts remote repositories
using either the `git://` notation, or `git@`.
Docker attempted to parse both as an URL, however,
`git@` is not an URL, but an argument to `git clone`.
Go 1.7 silently ignored this, and managed to
extract the needed information from these
remotes, however, Go 1.8 does a more strict
validation, and invalidated these.
This patch adds a different path for `git@` remotes,
to prevent them from being handled as URL (and
invalidated).
A test is also added, because there were no
tests for handling of `git@` remotes.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 913eb99fdcd26a4106250bd40dfe8b9c18564b23
Component: engine