<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-03-02T23:07:19Z</updated>
<entry>
<title>Merge branch 'ds/partial-clone-fixes'</title>
<updated>2020-03-02T23:07:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-02T23:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=444cff61b4467f71805b0def8300ab4e9c285bb4'/>
<id>urn:sha1:444cff61b4467f71805b0def8300ab4e9c285bb4</id>
<content type='text'>
Fix for a bug revealed by a recent change to make the protocol v2
the default.

* ds/partial-clone-fixes:
  partial-clone: avoid fetching when looking for objects
  partial-clone: demonstrate bugs in partial fetch
</content>
</entry>
<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 'tb/commit-graph-object-dir'</title>
<updated>2020-02-14T20:54:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-14T20:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53c3be2c29b97a68145d42b413df2f8c070a2084'/>
<id>urn:sha1:53c3be2c29b97a68145d42b413df2f8c070a2084</id>
<content type='text'>
The code to compute the commit-graph has been taught to use a more
robust way to tell if two object directories refer to the same
thing.

* tb/commit-graph-object-dir:
  commit-graph.h: use odb in 'load_commit_graph_one_fd_st'
  commit-graph.c: remove path normalization, comparison
  commit-graph.h: store object directory in 'struct commit_graph'
  commit-graph.h: store an odb in 'struct write_commit_graph_context'
  t5318: don't pass non-object directory to '--object-dir'
</content>
</entry>
<entry>
<title>commit-graph.h: store an odb in 'struct write_commit_graph_context'</title>
<updated>2020-02-04T19:36:37Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2020-02-04T05:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0bd52e27e315a76d6950fa30ce602eef15d90571'/>
<id>urn:sha1:0bd52e27e315a76d6950fa30ce602eef15d90571</id>
<content type='text'>
There are lots of places in 'commit-graph.h' where a function either has
(or almost has) a full 'struct object_directory *', accesses '-&gt;path',
and then throws away the rest of the struct.

This can cause headaches when comparing the locations of object
directories across alternates (e.g., in the case of deciding if two
commit-graph layers can be merged). These paths are normalized with
'normalize_path_copy()' which mitigates some comparison issues, but not
all [1].

Replace usage of 'char *object_dir' with 'odb-&gt;path' by storing a
'struct object_directory *' in the 'write_commit_graph_context'
structure. This is an intermediate step towards getting rid of all path
normalization in 'commit-graph.c'.

Resolving a user-provided '--object-dir' argument now requires that we
compare it to the known alternates for equality.  Prior to this patch,
an unknown '--object-dir' argument would silently exit with status zero.

This can clearly lead to unintended behavior, such as verifying
commit-graphs that aren't in a repository's own object store (or one of
its alternates), or causing a typo to mask a legitimate commit-graph
verification failure. Make this error non-silent by 'die()'-ing when the
given '--object-dir' does not match any known alternate object store.

[1]: In my testing, for example, I can get one side of the commit-graph
code to fill object_dir with "./objects" and the other with just
"objects".

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: forgo full connectivity check if --filter</title>
<updated>2020-01-30T18:55:47Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-01-12T04:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2df1aa239cd50698ab3e0c2cb18b9c1d2f0e44d7'/>
<id>urn:sha1:2df1aa239cd50698ab3e0c2cb18b9c1d2f0e44d7</id>
<content type='text'>
If a filter is specified, we do not need a full connectivity check on
the contents of the packfile we just fetched; we only need to check that
the objects referenced are promisor objects.

This significantly speeds up fetches into repositories that have many
promisor objects, because during the connectivity check, all promisor
objects are enumerated (to mark them UNINTERESTING), and that takes a
significant amount of time.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.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>
</feed>
