Skip to content

Commit

Permalink
gvfs-helper: move content-type warning for prefetch packs
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
  • Loading branch information
derrickstolee authored and dscho committed Aug 16, 2023
1 parent fe82c18 commit d77fdb2
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions gvfs-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2453,25 +2453,25 @@ static void install_result(struct gh__request_params *params,
install_prefetch(params, status);
return;
}
}

if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
assert(params->b_is_post);
assert(params->objects_mode == GH__OBJECTS_MODE__POST);
} else {
if (!strcmp(status->content_type.buf, "application/x-git-packfile")) {
assert(params->b_is_post);
assert(params->objects_mode == GH__OBJECTS_MODE__POST);

install_packfile(params, status);
return;
}
install_packfile(params, status);
return;
}

if (!strcmp(status->content_type.buf,
"application/x-git-loose-object")) {
/*
* We get these for "gvfs/objects" GET and POST requests.
*
* Note that this content type is singular, not plural.
*/
install_loose(params, status);
return;
if (!strcmp(status->content_type.buf,
"application/x-git-loose-object")) {
/*
* We get these for "gvfs/objects" GET and POST requests.
*
* Note that this content type is singular, not plural.
*/
install_loose(params, status);
return;
}
}

strbuf_addf(&status->error_message,
Expand Down

0 comments on commit d77fdb2

Please sign in to comment.