URL_SCHEME_GIT
};
-int url_is_local_not_ssh(const char *url)
-{
- const char *colon = strchr(url, ':');
- const char *slash = strchr(url, '/');
- return !colon || (slash && slash < colon) ||
- (has_dos_drive_prefix(url) && is_valid_path(url));
-}
-
static const char *url_scheme_name(enum url_scheme scheme)
{
switch (scheme) {
int server_supports(const char *feature);
int parse_feature_request(const char *features, const char *feature);
const char *server_feature_value(const char *feature, size_t *len_ret);
-int url_is_local_not_ssh(const char *url);
struct packet_reader;
enum protocol_version discover_version(struct packet_reader *reader);
#include "gettext.h"
#include "hex.h"
#include "remote.h"
+#include "url.h"
#include "urlmatch.h"
#include "refs.h"
#include "refspec.h"
free(*dest);
*dest = strbuf_detach(&buf, NULL);
}
+
+int url_is_local_not_ssh(const char *url)
+{
+ const char *colon = strchr(url, ':');
+ const char *slash = strchr(url, '/');
+ return !colon || (slash && slash < colon) ||
+ (has_dos_drive_prefix(url) && is_valid_path(url));
+}
void end_url_with_slash(struct strbuf *buf, const char *url);
void str_end_url_with_slash(const char *url, char **dest);
+int url_is_local_not_ssh(const char *url);
+
/*
* The set of unreserved characters as per STD66 (RFC3986) is
* '[A-Za-z0-9-._~]'. These characters are safe to appear in URI