commit - 29b6cbbaee05814fbac85312d69ee8ec76c92d82
commit + 44740114875c96dd82e588aab0025e97c25d3997
blob - f443ed57aaa607502d7aade2e884676a1cfe4b79
blob + a5f2e1b28bbc8c0f51f1f3e9385f4f165dbd0b1b
--- libexec/got-fetch-http/got-fetch-http.c
+++ libexec/got-fetch-http/got-fetch-http.c
if ((sock = dial(https, host, port)) == -1)
return -1;
-#ifndef PROFILE
- /* TODO: can we push this upwards such that get_refs() is covered? */
- if (pledge("stdio", NULL) == -1)
- err(1, "pledge");
-#endif
+
if (bufio_init(&bio)) {
warnx("bufio_init");
goto err;
warnx("bufio_starttls");
goto err;
}
-
+#ifndef PROFILE
+ /* TODO: can we push this upwards such that get_refs() is covered? */
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+#endif
if (http_open(&bio, https, "POST", host, port, path, "/git-upload-pack",
NULL, UPLOAD_PACK_REQ) == -1)
goto err;