Skip to content

Commit 5cc2142

Browse files
committed
fixup! gvfs-helper: run prefetch index-pack in parallel (#941)
When adding the `gvfs.prefetchThreads` config option in #876, I didn't realize that the child `git index-pack` processes would output the hashes of the pack contents. This makes the output quiet. It's committed as a `fixup!` so it can be squashed in the `vfs-2.55.0` release (or this PR can be repeated on that branch and squashed in 2.56.0). The tests check stderr because the parallel process runner sets `stdout_to_stderr` so the previous behavior showed up over `stderr` from the top level process. * [X] This change only applies to interactions with Azure DevOps and the GVFS Protocol.
2 parents 5ab9ad4 + 1f95d4c commit 5cc2142

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

gvfs-helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,6 +2447,7 @@ static int prefetch_get_next_task(struct child_process *cp,
24472447
strvec_pushl(&cp->args, "-o", entry->temp_path_idx.buf, NULL);
24482448
strvec_push(&cp->args, entry->temp_path_pack.buf);
24492449
cp->no_stdin = 1;
2450+
cp->no_stdout = 1;
24502451

24512452
return 1;
24522453
}

t/t5797-gvfs-helper-prefetch-threads.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ do_prefetch_all () {
2121
--no-progress \
2222
prefetch >OUT.output 2>OUT.stderr &&
2323

24+
test_must_be_empty OUT.stderr &&
2425
verify_received_packfile_count 3 &&
2526
verify_prefetch_keeps 1200000000
2627
}
@@ -34,6 +35,7 @@ do_prefetch_since () {
3435
--no-progress \
3536
prefetch --since="1000000000" >OUT.output 2>OUT.stderr &&
3637

38+
test_must_be_empty OUT.stderr &&
3739
verify_received_packfile_count 2 &&
3840
verify_prefetch_keeps 1200000000
3941
}
@@ -47,6 +49,7 @@ do_prefetch_up_to_date () {
4749
--no-progress \
4850
prefetch --since="1000000000" >OUT.output 2>OUT.stderr &&
4951

52+
test_must_be_empty OUT.stderr &&
5053
verify_received_packfile_count 2 &&
5154
verify_prefetch_keeps 1200000000 &&
5255

@@ -57,6 +60,7 @@ do_prefetch_up_to_date () {
5760
--no-progress \
5861
prefetch >OUT.output 2>OUT.stderr &&
5962

63+
test_must_be_empty OUT.stderr &&
6064
verify_received_packfile_count 0 &&
6165
verify_prefetch_keeps 1200000000
6266
}

0 commit comments

Comments
 (0)