summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-09-01 22:49:14 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-09-01 22:49:14 -0400
commitfd50810aeb3f2eb968521e9b540dfa211b4f1350 (patch)
tree9feabc5a0579dd84450f04cd1a40328db7b3e419
parent002b2ffe69d9d17e5b5570c5cd3cc13bac4b004c (diff)
downloadlibgit2-fd50810aeb3f2eb968521e9b540dfa211b4f1350.tar.gz
url: ensure minimum components for formatting
-rw-r--r--src/net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.c b/src/net.c
index a685e4893..de28bf9f8 100644
--- a/src/net.c
+++ b/src/net.c
@@ -401,6 +401,9 @@ void git_net_url_swap(git_net_url *a, git_net_url *b)
int git_net_url_fmt(git_buf *buf, git_net_url *url)
{
+ GIT_ASSERT_ARG(in->scheme);
+ GIT_ASSERT_ARG(in->host);
+
git_buf_puts(buf, url->scheme);
git_buf_puts(buf, "://");