Skip to content

Commit 233ec66

Browse files
derrickstoleedscho
authored andcommitted
gvfs-helper: move content-type warning for prefetch packs
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
1 parent 2040889 commit 233ec66

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

gvfs-helper.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,25 +2442,25 @@ static void install_result(struct gh__request_params *params,
24422442
install_prefetch(params, status);
24432443
return;
24442444
}
2445-
}
2446-
2447-
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2448-
assert(params->b_is_post);
2449-
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
2445+
} else {
2446+
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2447+
assert(params->b_is_post);
2448+
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
24502449

2451-
install_packfile(params, status);
2452-
return;
2453-
}
2450+
install_packfile(params, status);
2451+
return;
2452+
}
24542453

2455-
if (!strcmp(status->content_type.buf,
2456-
"application/x-git-loose-object")) {
2457-
/*
2458-
* We get these for "gvfs/objects" GET and POST requests.
2459-
*
2460-
* Note that this content type is singular, not plural.
2461-
*/
2462-
install_loose(params, status);
2463-
return;
2454+
if (!strcmp(status->content_type.buf,
2455+
"application/x-git-loose-object")) {
2456+
/*
2457+
* We get these for "gvfs/objects" GET and POST requests.
2458+
*
2459+
* Note that this content type is singular, not plural.
2460+
*/
2461+
install_loose(params, status);
2462+
return;
2463+
}
24642464
}
24652465

24662466
strbuf_addf(&status->error_message,

0 commit comments

Comments
 (0)