about summary refs log tree commit diff
path: root/third_party/git/url.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/url.h')
-rw-r--r--third_party/git/url.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/third_party/git/url.h b/third_party/git/url.h
new file mode 100644
index 000000000000..2a27c3427763
--- /dev/null
+++ b/third_party/git/url.h
@@ -0,0 +1,24 @@
+#ifndef URL_H
+#define URL_H
+
+struct strbuf;
+
+int is_url(const char *url);
+int is_urlschemechar(int first_flag, int ch);
+char *url_decode(const char *url);
+char *url_decode_mem(const char *url, int len);
+
+/*
+ * Similar to the url_decode_{,mem} methods above, but doesn't assume there
+ * is a scheme followed by a : at the start of the string. Instead, %-sequences
+ * before any : are also parsed.
+ */
+char *url_percent_decode(const char *encoded);
+
+char *url_decode_parameter_name(const char **query);
+char *url_decode_parameter_value(const char **query);
+
+void end_url_with_slash(struct strbuf *buf, const char *url);
+void str_end_url_with_slash(const char *url, char **dest);
+
+#endif /* URL_H */