Skip to content

Commit 65222a5

Browse files
committed
fixup! gvfs-helper: create tool to fetch objects using the GVFS Protocol
Signed-off-by: Derrick Stolee <stolee@gmail.com>
1 parent d50fc42 commit 65222a5

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

‎gvfs-helper-client.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ static int gh_client__objects__receive_response(
250250
}
251251

252252
else if (starts_with(line, "packfile")) {
253-
gh_client__update_packed_git(line);
254253
ghc |= GHC__CREATED__PACKFILE;
255254
nr_packfile++;
256255
}
@@ -271,6 +270,9 @@ static int gh_client__objects__receive_response(
271270
}
272271
}
273272

273+
if (ghc & GHC__CREATED__PACKFILE)
274+
packfile_store_reprepare(the_repository->objects->packfiles);
275+
274276
*p_ghc = ghc;
275277
*p_nr_loose = nr_loose;
276278
*p_nr_packfile = nr_packfile;

‎t/t5799-gvfs-helper.sh‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,15 +1285,30 @@ test_expect_success 'integration: explicit commit/trees, implicit blobs: diff 2
12851285
>OUT.output 2>OUT.stderr
12861286
'
12871287

1288+
trace_has_queue_oid () {
1289+
oid=$1
1290+
grep "gh_client__queue_oid: $oid"
1291+
}
1292+
1293+
trace_has_immediate_oid () {
1294+
oid=$1
1295+
grep "gh_client__get_immediate: $oid"
1296+
}
1297+
12881298
test_expect_success 'integration: fully implicit: diff 2 commits' '
12891299
test_when_finished "per_test_cleanup" &&
12901300
start_gvfs_protocol_server &&
12911301
12921302
# Implicitly demand-load everything without any pre-seeding.
12931303
#
1304+
GIT_TRACE2_EVENT="$(pwd)/diff-trace.txt" \
12941305
git -C "$REPO_T1" -c core.useGVFSHelper=true \
12951306
diff $(cat m1.branch)..$(cat m3.branch) \
1296-
>OUT.output 2>OUT.stderr
1307+
>OUT.output 2>OUT.stderr &&
1308+
1309+
oid=$(git -C "$REPO_SRC" rev-parse main:file9.txt.t) &&
1310+
trace_has_queue_oid $oid <diff-trace.txt &&
1311+
! trace_has_immediate_oid $oid <diff-trace.txt
12971312
'
12981313

12991314
# T1 should be considered contaminated at this point.

0 commit comments

Comments
 (0)