<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch v2.25.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.25.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.25.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-02-22T17:23:08Z</updated>
<entry>
<title>partial-clone: avoid fetching when looking for objects</title>
<updated>2020-02-22T17:23:08Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2020-02-21T21:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e96c66805f17d7345eba4733bc80c6fe646b95f'/>
<id>urn:sha1:3e96c66805f17d7345eba4733bc80c6fe646b95f</id>
<content type='text'>
When using partial clone, find_non_local_tags() in builtin/fetch.c
checks each remote tag to see if its object also exists locally. There
is no expectation that the object exist locally, but this function
nevertheless triggers a lazy fetch if the object does not exist. This
can be extremely expensive when asking for a commit, as we are
completely removed from the context of the non-existent object and
thus supply no "haves" in the request.

6462d5eb9a (fetch: remove fetch_if_missing=0, 2019-11-05) removed a
global variable that prevented these fetches in favor of a bitflag.
However, some object existence checks were not updated to use this flag.

Update find_non_local_tags() to use OBJECT_INFO_SKIP_FETCH_OBJECT in
addition to OBJECT_INFO_QUICK. The _QUICK option only prevents
repreparing the pack-file structures. We need to be extremely careful
about supplying _SKIP_FETCH_OBJECT when we expect an object to not exist
due to updated refs.

This resolves a broken test in t5616-partial-clone.sh.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/commit-graph-set-size-mult'</title>
<updated>2020-01-06T22:17:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-01-06T22:17:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=037f0675875b7cba0cb6520646ba2e3a48576219'/>
<id>urn:sha1:037f0675875b7cba0cb6520646ba2e3a48576219</id>
<content type='text'>
The code to write split commit-graph file(s) upon fetching computed
bogus value for the parameter used in splitting the resulting
files, which has been corrected.

* ds/commit-graph-set-size-mult:
  commit-graph: prefer default size_mult when given zero
</content>
</entry>
<entry>
<title>commit-graph: prefer default size_mult when given zero</title>
<updated>2020-01-02T21:46:34Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2020-01-02T16:14:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63020f175fe26f3250ac8d19d02ef9ee271006e5'/>
<id>urn:sha1:63020f175fe26f3250ac8d19d02ef9ee271006e5</id>
<content type='text'>
In 50f26bd ("fetch: add fetch.writeCommitGraph config setting",
2019-09-02), the fetch builtin added the capability to write a
commit-graph using the "--split" feature. This feature creates
multiple commit-graph files, and those can merge based on a set
of "split options" including a size multiple. The default size
multiple is 2, which intends to provide a log_2 N depth of the
commit-graph chain where N is the number of commits.

However, I noticed during dogfooding that my commit-graph chains
were becoming quite large when left only to builds by 'git fetch'.
It turns out that in split_graph_merge_strategy(), we default the
size_mult variable to 2 except we override it with the context's
split_opts if they exist. In builtin/fetch.c, we create such a
split_opts, but do not populate it with values.

This problem is due to two failures:

 1. It is unclear that we can add the flag COMMIT_GRAPH_WRITE_SPLIT
    with a NULL split_opts.
 2. If we have a non-NULL split_opts, then we override the default
    values even if a zero value is given.

Correct both of these issues. First, do not override size_mult when
the options provide a zero value. Second, stop creating a split_opts
in the fetch builtin.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/use-skip-prefix-more'</title>
<updated>2019-12-06T23:09:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-06T23:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=391fb22ac760042fd1cffe451f4ec9a4eb57e39e'/>
<id>urn:sha1:391fb22ac760042fd1cffe451f4ec9a4eb57e39e</id>
<content type='text'>
Code cleanup.

* rs/use-skip-prefix-more:
  name-rev: use skip_prefix() instead of starts_with()
  push: use skip_prefix() instead of starts_with()
  shell: use skip_prefix() instead of starts_with()
  fmt-merge-msg: use skip_prefix() instead of starts_with()
  fetch: use skip_prefix() instead of starts_with()
</content>
</entry>
<entry>
<title>Merge branch 'jt/fetch-remove-lazy-fetch-plugging'</title>
<updated>2019-12-01T17:04:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-01T17:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fce9e836d395fb315bb8b77619868098a6cb02eb'/>
<id>urn:sha1:fce9e836d395fb315bb8b77619868098a6cb02eb</id>
<content type='text'>
"git fetch" codepath had a big "do not lazily fetch missing objects
when I ask if something exists" switch.  This has been corrected by
marking the "does this thing exist?" calls with "if not please do not
lazily fetch it" flag.

* jt/fetch-remove-lazy-fetch-plugging:
  promisor-remote: remove fetch_if_missing=0
  clone: remove fetch_if_missing=0
  fetch: remove fetch_if_missing=0
</content>
</entry>
<entry>
<title>Merge branch 'en/doc-typofix'</title>
<updated>2019-12-01T17:04:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-01T17:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3096d2ba68aa6814d531317433f1cdcd76ba55c'/>
<id>urn:sha1:d3096d2ba68aa6814d531317433f1cdcd76ba55c</id>
<content type='text'>
Docfix.

* en/doc-typofix:
  Fix spelling errors in no-longer-updated-from-upstream modules
  multimail: fix a few simple spelling errors
  sha1dc: fix trivial comment spelling error
  Fix spelling errors in test commands
  Fix spelling errors in messages shown to users
  Fix spelling errors in names of tests
  Fix spelling errors in comments of testcases
  Fix spelling errors in code comments
  Fix spelling errors in documentation outside of Documentation/
  Documentation: fix a bunch of typos, both old and new
</content>
</entry>
<entry>
<title>Merge branch 'js/fetch-multi-lockfix'</title>
<updated>2019-12-01T17:04:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-01T17:04:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcb06e204c21538067fbd232415ca704f410dbf7'/>
<id>urn:sha1:bcb06e204c21538067fbd232415ca704f410dbf7</id>
<content type='text'>
Fetching from multiple remotes into the same repository in parallel
had a bad interaction with the recent change to (optionally) update
the commit-graph after a fetch job finishes, as these parallel
fetches compete with each other.  Which has been corrected.

* js/fetch-multi-lockfix:
  fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph
  fetch: add the command-line option `--write-commit-graph`
</content>
</entry>
<entry>
<title>Merge branch 'rt/fetch-message-fix'</title>
<updated>2019-12-01T17:04:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-01T17:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ab2088255449e6336167295c4bc3e4a60126b41'/>
<id>urn:sha1:7ab2088255449e6336167295c4bc3e4a60126b41</id>
<content type='text'>
A small message update.

* rt/fetch-message-fix:
  fetch.c: fix typo in a warning message
</content>
</entry>
<entry>
<title>fetch: use skip_prefix() instead of starts_with()</title>
<updated>2019-11-27T02:17:22Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-11-26T11:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6293f5d28763580dd1035d3c6b018b42be7e25a'/>
<id>urn:sha1:a6293f5d28763580dd1035d3c6b018b42be7e25a</id>
<content type='text'>
Get rid of magic numbers by letting skip_prefix() set the pointer
"what".

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling errors in code comments</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15beaaa3d1f6b555900446deb5e376b4f806d734'/>
<id>urn:sha1:15beaaa3d1f6b555900446deb5e376b4f806d734</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
