MCPcopy Index your code
hub / github.com/git/git / quote_ref_url

Function quote_ref_url

http.c:1859–1874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1857}
1858
1859static char *quote_ref_url(const char *base, const char *ref)
1860{
1861 struct strbuf buf = STRBUF_INIT;
1862 const char *cp;
1863 int ch;
1864
1865 end_url_with_slash(&buf, base);
1866
1867 for (cp = ref; (ch = *cp) != 0; cp++)
1868 if (needs_quote(ch))
1869 strbuf_addf(&buf, "%%%02x", ch);
1870 else
1871 strbuf_addch(&buf, *cp);
1872
1873 return strbuf_detach(&buf, NULL);
1874}
1875
1876void append_remote_object_url(struct strbuf *buf, const char *url,
1877 const char *hex,

Callers 1

http_fetch_refFunction · 0.85

Calls 5

end_url_with_slashFunction · 0.85
needs_quoteFunction · 0.85
strbuf_addfFunction · 0.85
strbuf_addchFunction · 0.85
strbuf_detachFunction · 0.85

Tested by

no test coverage detected