Skip to content

Commit 2752a54

Browse files
derrickstoleevdye
authored andcommitted
gvfs-helper: move content-type warning for prefetch packs
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
1 parent d654b3a commit 2752a54

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
@@ -2453,25 +2453,25 @@ static void install_result(struct gh__request_params *params,
24532453
install_prefetch(params, status);
24542454
return;
24552455
}
2456-
}
2457-
2458-
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2459-
assert(params->b_is_post);
2460-
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
2456+
} else {
2457+
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2458+
assert(params->b_is_post);
2459+
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
24612460

2462-
install_packfile(params, status);
2463-
return;
2464-
}
2461+
install_packfile(params, status);
2462+
return;
2463+
}
24652464

2466-
if (!strcmp(status->content_type.buf,
2467-
"application/x-git-loose-object")) {
2468-
/*
2469-
* We get these for "gvfs/objects" GET and POST requests.
2470-
*
2471-
* Note that this content type is singular, not plural.
2472-
*/
2473-
install_loose(params, status);
2474-
return;
2465+
if (!strcmp(status->content_type.buf,
2466+
"application/x-git-loose-object")) {
2467+
/*
2468+
* We get these for "gvfs/objects" GET and POST requests.
2469+
*
2470+
* Note that this content type is singular, not plural.
2471+
*/
2472+
install_loose(params, status);
2473+
return;
2474+
}
24752475
}
24762476

24772477
strbuf_addf(&status->error_message,

0 commit comments

Comments
 (0)