summaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-12-01 14:00:49 +1100
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 09:54:29 -0600
commit471daeea559ada7ac215806d55f2f686e7389608 (patch)
treec283027795a31511782327a4307a6a639e325762 /src/net.h
parent297c61e41f23caacb39d8c00957fd5ec050c9cbf (diff)
downloadlibgit2-471daeea559ada7ac215806d55f2f686e7389608.tar.gz
net: refactor gitno redirect handling
Move the redirect handling into `git_net_url` for consistency.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 11dcf97da..31fff9772 100644
--- a/src/net.h
+++ b/src/net.h
@@ -30,6 +30,12 @@ extern bool git_net_url_valid(git_net_url *url);
/** Returns nonzero if the URL is on the default port. */
extern int git_net_url_is_default_port(git_net_url *url);
+/* Applies a redirect to the URL with a git-aware service suffix. */
+extern int git_net_url_apply_redirect(
+ git_net_url *url,
+ const char *redirect_location,
+ const char *service_suffix);
+
/** Swaps the contents of one URL for another. */
extern void git_net_url_swap(git_net_url *a, git_net_url *b);