Skip to content

Commit 1169bc5

Browse files
committed
fixup! gvfs-helper: create tool to fetch objects using the GVFS Protocol
1 parent 2ad010e commit 1169bc5

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ static void fix_unresolved_deltas(struct hashfile *f)
13521352
sorted_by_pos[i] = &ref_deltas[i];
13531353
QSORT(sorted_by_pos, nr_ref_deltas, delta_pos_compare);
13541354

1355-
if (has_promisor_remote() || core_use_gvfs_helper) {
1355+
if (has_promisor_remote()) {
13561356
/*
13571357
* Prefetch the delta bases.
13581358
*/

diff.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6504,8 +6504,7 @@ static void add_if_missing(struct repository *r,
65046504

65056505
void diffcore_std(struct diff_options *options)
65066506
{
6507-
if (options->repo == the_repository &&
6508-
(has_promisor_remote() || core_use_gvfs_helper)) {
6507+
if (options->repo == the_repository && has_promisor_remote()) {
65096508
/*
65106509
* Prefetch the diff pairs that are about to be flushed.
65116510
*/

promisor-remote.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ static int fetch_objects(const char *remote_name,
4141
struct ref *ref = NULL;
4242
int i;
4343

44-
if (core_use_gvfs_helper) {
45-
enum gh_client__created ghc = GHC__CREATED__NOTHING;
46-
47-
gh_client__queue_oid_array(oids, oid_nr);
48-
gh_client__drain_queue(&ghc);
49-
return 0;
50-
}
5144

5245
for (i = 0; i < oid_nr; i++) {
5346
struct ref *new_ref = alloc_ref(oid_to_hex(&oids[i]));
@@ -208,7 +201,7 @@ struct promisor_remote *promisor_remote_find(const char *remote_name)
208201

209202
int has_promisor_remote(void)
210203
{
211-
return !!promisor_remote_find(NULL);
204+
return core_use_gvfs_helper || !!promisor_remote_find(NULL);
212205
}
213206

214207
static int remove_fetched_oids(struct repository *repo,
@@ -253,6 +246,14 @@ int promisor_remote_get_direct(struct repository *repo,
253246
int to_free = 0;
254247
int res = -1;
255248

249+
if (core_use_gvfs_helper) {
250+
enum gh_client__created ghc = GHC__CREATED__NOTHING;
251+
252+
trace2_data_intmax("bug", the_repository, "fetch_objects/gvfs-helper", oid_nr);
253+
gh_client__queue_oid_array(oids, oid_nr);
254+
return gh_client__drain_queue(&ghc);
255+
}
256+
256257
promisor_remote_init();
257258

258259
for (r = promisors; r; r = r->next) {

unpack-trees.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ static int check_updates(struct unpack_trees_options *o)
408408
load_gitmodules_file(index, &state);
409409

410410
enable_delayed_checkout(&state);
411-
if ((has_promisor_remote() || core_use_gvfs_helper) &&
412-
o->update && !o->dry_run) {
411+
if (has_promisor_remote() && o->update && !o->dry_run) {
413412
/*
414413
* Prefetch the objects that are to be checked out in the loop
415414
* below.

0 commit comments

Comments
 (0)