Skip to content

Commit f985a38

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

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
@@ -2457,25 +2457,25 @@ static void install_result(struct gh__request_params *params,
24572457
install_prefetch(params, status);
24582458
return;
24592459
}
2460-
}
2461-
2462-
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2463-
assert(params->b_is_post);
2464-
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
2460+
} else {
2461+
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
2462+
assert(params->b_is_post);
2463+
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
24652464

2466-
install_packfile(params, status);
2467-
return;
2468-
}
2465+
install_packfile(params, status);
2466+
return;
2467+
}
24692468

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

24812481
strbuf_addf(&status->error_message,

0 commit comments

Comments
 (0)