<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-02-21T20:09:40Z</updated>
<entry>
<title>fetch: choose a sensible default with --jobs=0 again</title>
<updated>2023-02-21T20:09:40Z</updated>
<author>
<name>Matthias Aßhauer</name>
<email>mha1993@live.de</email>
</author>
<published>2023-02-20T21:33:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c39952b925ccf59e49f3c174861a862dc1721492'/>
<id>urn:sha1:c39952b925ccf59e49f3c174861a862dc1721492</id>
<content type='text'>
prior to 51243f9 (run-command API: don't fall back on online_cpus(),
2022-10-12) `git fetch --multiple --jobs=0` would choose some default amount
of jobs, similar to `git -c fetch.parallel=0 fetch --multiple`. While our
documentation only ever promised that `fetch.parallel` would fall back to a
"sensible default", it makes sense to do the same for `--jobs`. So fall back
to online_cpus() and not BUG() out.

This fixes https://github.com/git-for-windows/git/issues/4302

Reported-by: Drew Noakes &lt;drnoakes@microsoft.com&gt;
Signed-off-by: Matthias Aßhauer &lt;mha1993@live.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/bundle-uri-5'</title>
<updated>2023-02-16T01:11:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-02-16T01:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f598364519f5bb871caf12a482ed117a270588b'/>
<id>urn:sha1:4f598364519f5bb871caf12a482ed117a270588b</id>
<content type='text'>
The bundle-URI subsystem adds support for creation-token heuristics
to help incremental fetches.

* ds/bundle-uri-5:
  bundle-uri: test missing bundles with heuristic
  bundle-uri: store fetch.bundleCreationToken
  fetch: fetch from an external bundle URI
  bundle-uri: drop bundle.flag from design doc
  clone: set fetch.bundleURI if appropriate
  bundle-uri: download in creationToken order
  bundle-uri: parse bundle.&lt;id&gt;.creationToken values
  bundle-uri: parse bundle.heuristic=creationToken
  t5558: add tests for creationToken heuristic
  bundle: verify using check_connected()
  bundle: test unbundling with incomplete history
</content>
</entry>
<entry>
<title>fetch: fetch from an external bundle URI</title>
<updated>2023-01-31T16:57:48Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2023-01-31T13:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f0cc04f2ca1653d573dbe981090895dc959ce65'/>
<id>urn:sha1:7f0cc04f2ca1653d573dbe981090895dc959ce65</id>
<content type='text'>
When a user specifies a URI via 'git clone --bundle-uri', that URI may
be a bundle list that advertises a 'bundle.heuristic' value. In that
case, the Git client stores a 'fetch.bundleURI' config value storing
that URI.

Teach 'git fetch' to check for this config value and download bundles
from that URI before fetching from the Git remote(s). Likely, the bundle
provider has configured a heuristic (such as "creationToken") that will
allow the Git client to download only a portion of the bundles before
continuing the fetch.

Since this URI is completely independent of the remote server, we want
to be sure that we connect to the bundle URI before creating a
connection to the Git remote. We do not want to hold a stateful
connection for too long if we can avoid it.

To test that this works correctly, extend the previous tests that set
'fetch.bundleURI' to do follow-up fetches. The bundle list is updated
incrementally at each phase to demonstrate that the heuristic avoids
downloading older bundles. This includes the middle fetch downloading
the objects in bundle-3.bundle from the Git remote, and therefore not
needing that bundle in the third fetch.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: fix duplicate remote parallel fetch bug</title>
<updated>2023-01-19T22:41:48Z</updated>
<author>
<name>Calvin Wan</name>
<email>calvinwan@google.com</email>
</author>
<published>2023-01-19T22:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06a668cb90a6e8628f295adb6177855bb0a85a4a'/>
<id>urn:sha1:06a668cb90a6e8628f295adb6177855bb0a85a4a</id>
<content type='text'>
Fetching in parallel from a remote group with a duplicated remote results
in the following:

error: cannot lock ref '&lt;ref&gt;': is at &lt;oid&gt; but expected &lt;oid&gt;

This doesn't happen in serial since fetching from the same remote that
has already been fetched from is a noop. Therefore, remove any duplicated
remotes after remote groups are parsed.

Signed-off-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/no-more-run-command-v'</title>
<updated>2022-11-08T22:15:12Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2022-11-08T22:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be4ac3b197f8b4070bdad65dea4a03e1389410a6'/>
<id>urn:sha1:be4ac3b197f8b4070bdad65dea4a03e1389410a6</id>
<content type='text'>
Simplify the run-command API.

* rs/no-more-run-command-v:
  replace and remove run_command_v_opt()
  replace and remove run_command_v_opt_cd_env_tr2()
  replace and remove run_command_v_opt_tr2()
  replace and remove run_command_v_opt_cd_env()
  use child_process members "args" and "env" directly
  use child_process member "args" instead of string array variable
  sequencer: simplify building argument list in do_exec()
  bisect--helper: factor out do_bisect_run()
  bisect: simplify building "checkout" argument list
  am: simplify building "show" argument list
  run-command: fix return value comment
  merge: remove always-the-same "verbose" arguments
</content>
</entry>
<entry>
<title>replace and remove run_command_v_opt()</title>
<updated>2022-10-30T18:04:51Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ddbb47fde9b6d8cd9f3728847a378f634318cfb1'/>
<id>urn:sha1:ddbb47fde9b6d8cd9f3728847a378f634318cfb1</id>
<content type='text'>
Replace the remaining calls of run_command_v_opt() with run_command()
calls and explict struct child_process variables.  This is more verbose,
but not by much overall.  The code becomes more flexible, e.g. it's easy
to extend to conditionally add a new argument.

Then remove the now unused function and its own flag names, simplifying
the run-command API.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>run-command API: move *_tr2() users to "run_processes_parallel()"</title>
<updated>2022-10-12T21:12:41Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-10-12T21:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36d69bf77e26793277d2708dd9ddad078e7e67a2'/>
<id>urn:sha1:36d69bf77e26793277d2708dd9ddad078e7e67a2</id>
<content type='text'>
Have the users of the "run_processes_parallel_tr2()" function use
"run_processes_parallel()" instead. In preceding commits the latter
was refactored to take a "struct run_process_parallel_opts" argument,
since the only reason for "run_processes_parallel_tr2()" to exist was
to take arguments that are now a part of that struct we can do away
with it.

See ee4512ed481 (trace2: create new combined trace facility,
2019-02-22) for the addition of the "*_tr2()" variant of the function,
it was used by every caller except "t/helper/test-run-command.c"..

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command API: don't fall back on online_cpus()</title>
<updated>2022-10-12T21:12:41Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-10-12T21:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=51243f9f0f6a932ea579fd6f8014b348f8c2a523'/>
<id>urn:sha1:51243f9f0f6a932ea579fd6f8014b348f8c2a523</id>
<content type='text'>
When a "jobs = 0" is passed let's BUG() out rather than fall back on
online_cpus(). The default behavior was added when this API was
implemented in c553c72eed6 (run-command: add an asynchronous parallel
child processor, 2015-12-15).

Most of our code in-tree that scales up to "online_cpus()" by default
calls that function by itself. Keeping this default behavior just for
the sake of two callers means that we'd need to maintain this one spot
where we're second-guessing the config passed down into pp_init().

The preceding commit has an overview of the API callers that passed
"jobs = 0". There were only two of them (actually three, but they
resolved to these two config parsing codepaths).

The "fetch.parallel" caller already had a test for the
"fetch.parallel=0" case added in 0353c688189 (fetch: do not run a
redundant fetch from submodule, 2022-05-16), but there was no such
test for "submodule.fetchJobs". Let's add one here.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command API: have "run_processes_parallel{,_tr2}()" return void</title>
<updated>2022-10-12T21:12:40Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-10-12T21:02:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7dd5762d9f3980a85f96dd9f143184dc2fa07275'/>
<id>urn:sha1:7dd5762d9f3980a85f96dd9f143184dc2fa07275</id>
<content type='text'>
Change the "run_processes_parallel{,_tr2}()" functions to return void,
instead of int. Ever since c553c72eed6 (run-command: add an
asynchronous parallel child processor, 2015-12-15) they have
unconditionally returned 0.

To get a "real" return value out of this function the caller needs to
get it via the "task_finished_fn" callback, see the example in hook.c
added in 96e7225b310 (hook: add 'run' subcommand, 2021-12-22).

So the "result = " and "if (!result)" code added to "builtin/fetch.c"
d54dea77dba (fetch: let --jobs=&lt;n&gt; parallelize --multiple, too,
2019-10-05) has always been redundant, we always took that "if"
path. Likewise the "ret =" in "t/helper/test-run-command.c" added in
be5d88e1128 (test-tool run-command: learn to run (parts of) the
testsuite, 2019-10-04) wasn't used, instead we got the return value
from the "if (suite.failed.nr &gt; 0)" block seen in the context.

Subsequent commits will alter this API interface, getting rid of this
always-zero return value makes it easier to understand those changes.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/list-objects-filter-cleanup'</title>
<updated>2022-09-19T21:35:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-09-19T21:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=298a9582249255fe00660a78dba0bb0ef0e1dbe8'/>
<id>urn:sha1:298a9582249255fe00660a78dba0bb0ef0e1dbe8</id>
<content type='text'>
A couple of bugfixes with code clean-up.

* jk/list-objects-filter-cleanup:
  list-objects-filter: convert filter_spec to a strbuf
  list-objects-filter: add and use initializers
  list-objects-filter: handle null default filter spec
  list-objects-filter: don't memset after releasing filter struct
</content>
</entry>
</feed>
