<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/list-objects-filter.c, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-06-21T18:24:09Z</updated>
<entry>
<title>Merge branch 'md/list-objects-filter-memfix'</title>
<updated>2019-06-21T18:24:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-06-21T18:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34032c4f8fe90aa020f7d85c556312b3d8902f6e'/>
<id>urn:sha1:34032c4f8fe90aa020f7d85c556312b3d8902f6e</id>
<content type='text'>
The filter_data used in the list-objects-filter (which manages a
lazily sparse clone repository) did not use the dynamic array API
correctly---'nr' is supposed to point at one past the last element
of the array in use.  This has been corrected.

* md/list-objects-filter-memfix:
  list-objects-filter: correct usage of ALLOC_GROW
</content>
</entry>
<entry>
<title>list-objects-filter: correct usage of ALLOC_GROW</title>
<updated>2019-05-31T19:36:07Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-05-31T18:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7140600e2e78f202594ebca09e3176b6fcac1625'/>
<id>urn:sha1:7140600e2e78f202594ebca09e3176b6fcac1625</id>
<content type='text'>
In the sparse filter data, array_frame array is used in a way such that
nr is the index of the last element. Fix this so that nr is actually the
number of elements in the array.

The filter_sparse_free function also has an unaddressed TODO to free the
memory associated with the sparse filter data. Address that TODO and fix
the memory leak.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: disable 'sparse:path' filters</title>
<updated>2019-05-29T18:05:34Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2019-05-29T12:44:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e693237e2ba27b6129e8af7f6a794f5c2fbd26f3'/>
<id>urn:sha1:e693237e2ba27b6129e8af7f6a794f5c2fbd26f3</id>
<content type='text'>
If someone wants to use as a filter a sparse file that is in the
repository, something like "--filter=sparse:oid=&lt;ref&gt;:&lt;path&gt;"
already works.

So 'sparse:path' is only interesting if the sparse file is not in
the repository. In this case though the current implementation has
a big security issue, as it makes it possible to ask the server to
read any file, like for example /etc/password, and to explore the
filesystem, as well as individual lines of files.

If someone is interested in using a sparse file that is not in the
repository as a filter, then at the minimum a config option, such
as "uploadpack.sparsePathFilter", should be implemented first to
restrict the directory from which the files specified by
'sparse:path' can be read.

For now though, let's just disable 'sparse:path' filters.

Helped-by: Matthew DeVore &lt;matvore@google.com&gt;
Helped-by: Jeff Hostetler &lt;git@jeffhostetler.com&gt;
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tree:&lt;depth&gt;: skip some trees even when collecting omits</title>
<updated>2019-01-15T23:39:34Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-01-09T02:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8272f26034c9dbaf5cd216a137b8e91241cbc24e'/>
<id>urn:sha1:8272f26034c9dbaf5cd216a137b8e91241cbc24e</id>
<content type='text'>
If a tree has already been recorded as omitted, we don't need to
traverse it again just to collect its omits. Stop traversing trees a
second time when collecting omits.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: teach tree:# how to handle &gt;0</title>
<updated>2019-01-15T23:39:34Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-01-09T02:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c813a7c35f44f4bf435c6ecb21bf4b9ec8f227de'/>
<id>urn:sha1:c813a7c35f44f4bf435c6ecb21bf4b9ec8f227de</id>
<content type='text'>
Implement positive values for &lt;depth&gt; in the tree:&lt;depth&gt; filter. The
exact semantics are described in Documentation/rev-list-options.txt.

The long-term goal at the end of this is to allow a partial clone to
eagerly fetch an entire directory of files by fetching a tree and
specifying &lt;depth&gt;=1. This, for instance, would make a build operation
fast and convenient. It is fast because the partial clone does not need
to fetch each file individually, and convenient because the user does
not need to supply a sparse-checkout specification.

Another way of considering this feature is as a way to reduce
round-trips, since the client can get any number of levels of
directories in a single request, rather than wait for each level of tree
objects to come back, whose entries are used to construct a new request.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter.c: remove implicit dependency on the_index</title>
<updated>2018-11-12T05:50:05Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-10T05:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01d40c8487f62476e722f30ba252359b59f35c33'/>
<id>urn:sha1:01d40c8487f62476e722f30ba252359b59f35c33</id>
<content type='text'>
While at there, since we have access to struct repository now,
eliminate the only the_repository reference in this file.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects: support for skipping tree traversal</title>
<updated>2018-10-18T03:49:18Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-18T00:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b10a206f090e01ce1ac4d9a10ec769e2409e2b0'/>
<id>urn:sha1:8b10a206f090e01ce1ac4d9a10ec769e2409e2b0</id>
<content type='text'>
The tree:0 filter does not need to traverse the trees that it has
filtered out, so optimize list-objects and list-objects-filter to skip
traversing the trees entirely. Before this patch, we iterated over all
children of the tree, and did nothing for all of them, which was
wasteful.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: implement filter tree:0</title>
<updated>2018-10-06T23:55:00Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc5975d24f33c974d53b3d94c5697fadaec5b000'/>
<id>urn:sha1:bc5975d24f33c974d53b3d94c5697fadaec5b000</id>
<content type='text'>
Teach list-objects the "tree:0" filter which allows for filtering
out all tree and blob objects (unless other objects are explicitly
specified by the user). The purpose of this patch is to allow smaller
partial clones.

The name of this filter - tree:0 - does not explicitly specify that
it also filters out all blobs, but this should not cause much confusion
because blobs are not at all useful without the trees that refer to
them.

I also considered only:commits as a name, but this is inaccurate because
it suggests that annotated tags are omitted, but actually they are
included.

The name "tree:0" allows later filtering based on depth, i.e. "tree:1"
would filter out all but the root tree and blobs. In order to avoid
confusion between 0 and capital O, the documentation was worded in a
somewhat round-about way that also hints at this future improvement to
the feature.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: use BUG rather than die</title>
<updated>2018-10-06T23:55:00Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=696aa73905c8c11b06735f9db830e55bc369849a'/>
<id>urn:sha1:696aa73905c8c11b06735f9db830e55bc369849a</id>
<content type='text'>
In some cases in this file, BUG makes more sense than die. In such
cases, a we get there from a coding error rather than a user error.

'return' has been removed following some instances of BUG since BUG does
not return.

Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/object-store-grafts'</title>
<updated>2018-07-18T19:20:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-07-18T19:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00624d608cc69bd62801c93e74d1ea7a7ddd6598'/>
<id>urn:sha1:00624d608cc69bd62801c93e74d1ea7a7ddd6598</id>
<content type='text'>
The conversion to pass "the_repository" and then "a_repository"
throughout the object access API continues.

* sb/object-store-grafts:
  commit: allow lookup_commit_graft to handle arbitrary repositories
  commit: allow prepare_commit_graft to handle arbitrary repositories
  shallow: migrate shallow information into the object parser
  path.c: migrate global git_path_* to take a repository argument
  cache: convert get_graft_file to handle arbitrary repositories
  commit: convert read_graft_file to handle arbitrary repositories
  commit: convert register_commit_graft to handle arbitrary repositories
  commit: convert commit_graft_pos() to handle arbitrary repositories
  shallow: add repository argument to is_repository_shallow
  shallow: add repository argument to check_shallow_file_for_update
  shallow: add repository argument to register_shallow
  shallow: add repository argument to set_alternate_shallow_file
  commit: add repository argument to lookup_commit_graft
  commit: add repository argument to prepare_commit_graft
  commit: add repository argument to read_graft_file
  commit: add repository argument to register_commit_graft
  commit: add repository argument to commit_graft_pos
  object: move grafts to object parser
  object-store: move object access functions to object-store.h
</content>
</entry>
</feed>
