url: track whether url explicitly specified a port by ethomson · Pull Request #6851 · libgit2/libgit2

@ethomson

When parsing URLs, track whether the port number was explicitly
specified or not. We track this separately from whether the port is the
_default_ port. This is so that we can discern between URLs that have
the default port explicitly specified or not.

For example: scp://host:22/foo and scp://host/foo are equivalent in
terms of functionality, but are not semantically equivalent.

A user might wish to specify scp://host:22/foo in order to explicitly
ensure that we connect on port 22, which might override (for example) a
different configuration option.