Skip to content

Commit

Permalink
Merge pull request #306: gvfs-helper-client: remove odb check
Browse files Browse the repository at this point in the history
This check verifies that the ODB matches what we supplied, but there are
some subtleties around Windows path names that can cause inexact matches
to be logically the same. Since this check is really intended only for
debugging and development purposes, let's remove it for now as a quick
workaround.

This was originally part of #304, as I hit it more often in that effort. However,
this was hit during the Scalar release process, so I'll need to generate new
installers.
  • Loading branch information
derrickstolee committed May 17, 2021
2 parents f8f92d9 + b1c292e commit bb240f1
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions gvfs-helper-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,28 +168,6 @@ static int gh_client__send__objects_prefetch(struct child_process *process,
return 0;
}

/*
* Verify that the pathname found in the "odb" response line matches
* what we requested.
*
* Since we ALWAYS send a "--shared-cache=<path>" arg to "gvfs-helper",
* we should be able to verify that the value is what we requested.
* In particular, I don't see a need to try to search for the response
* value in from our list of alternates.
*/
static void gh_client__verify_odb_line(const char *line)
{
const char *v1_odb_path;

if (!skip_prefix(line, "odb ", &v1_odb_path))
BUG("verify_odb_line: invalid line '%s'", line);

if (!gh_client__chosen_odb ||
strcmp(v1_odb_path, gh_client__chosen_odb->path))
BUG("verify_odb_line: unexpeced odb path '%s' vs '%s'",
v1_odb_path, gh_client__chosen_odb->path);
}

/*
* Update the loose object cache to include the newly created
* object.
Expand Down Expand Up @@ -291,7 +269,7 @@ static int gh_client__objects__receive_response(
break;

if (starts_with(line, "odb")) {
gh_client__verify_odb_line(line);
/* trust that this matches what we expect */
}

else if (starts_with(line, "packfile")) {
Expand Down

0 comments on commit bb240f1

Please sign in to comment.