<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/list-objects-filter.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>2022-12-26T02:42:05Z</updated>
<entry>
<title>Merge branch 'jk/unused-post-2.39'</title>
<updated>2022-12-26T02:42:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-12-26T02:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=179547932fb8484a5ab532ef1b56ed8b01946ab5'/>
<id>urn:sha1:179547932fb8484a5ab532ef1b56ed8b01946ab5</id>
<content type='text'>
Code clean-up around unused function parameters.

* jk/unused-post-2.39:
  userdiff: mark unused parameter in internal callback
  list-objects-filter: mark unused parameters in virtual functions
  diff: mark unused parameters in callbacks
  xdiff: mark unused parameter in xdl_call_hunk_func()
  xdiff: drop unused parameter in def_ff()
  ws: drop unused parameter from ws_blank_line()
  list-objects: drop process_gitlink() function
  blob: drop unused parts of parse_blob_buffer()
  ls-refs: use repository parameter to iterate refs
</content>
</entry>
<entry>
<title>Merge branch 'rs/plug-pattern-list-leak-in-lof'</title>
<updated>2022-12-19T02:46:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-12-19T02:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=02ec5e2eec9afa154d7610ff2bd8e2455541c8e2'/>
<id>urn:sha1:02ec5e2eec9afa154d7610ff2bd8e2455541c8e2</id>
<content type='text'>
Leak fix.

* rs/plug-pattern-list-leak-in-lof:
  list-objects-filter: plug pattern_list leak
</content>
</entry>
<entry>
<title>list-objects-filter: mark unused parameters in virtual functions</title>
<updated>2022-12-13T13:16:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-12-13T11:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3beb61f939ffcdbefc02d9ddf9d7a46102ec663'/>
<id>urn:sha1:d3beb61f939ffcdbefc02d9ddf9d7a46102ec663</id>
<content type='text'>
The "struct filter" abstract type defines several virtual function
pointers. Not all of the concrete functions need every parameter, but
they have to conform to the generic interface. Mark unused ones to
silence -Wunused-parameter.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: plug pattern_list leak</title>
<updated>2022-12-01T23:29:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-12-01T17:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=faebba436e6d8a274acfc5a3cc3fd4b6c2495d80'/>
<id>urn:sha1:faebba436e6d8a274acfc5a3cc3fd4b6c2495d80</id>
<content type='text'>
filter_sparse_oid__init() uses add_patterns_from_blob_to_list() to
populate the struct pattern_list member of struct filter_sparse_data.
Release it in the complementing filter_sparse_free().

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: plug combine_filter_data leak</title>
<updated>2022-11-21T07:43:26Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-11-20T11:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c2dc122f91970ea89a8af0053fbc655a9d58517'/>
<id>urn:sha1:7c2dc122f91970ea89a8af0053fbc655a9d58517</id>
<content type='text'>
filter_combine__init() allocates a struct combine_filter_data object and
assigns it to the filter_data member of struct filter_options.  Release
it in the complementing filter_combine__free().

Reported-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects: implement object type filter</title>
<updated>2021-04-19T21:09:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2021-04-19T11:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0c42a53c9d36ea69f4d2650001f05e98eb347cb'/>
<id>urn:sha1:b0c42a53c9d36ea69f4d2650001f05e98eb347cb</id>
<content type='text'>
While it already is possible to filter objects by some criteria in
git-rev-list(1), it is not yet possible to filter out only a specific
type of objects. This makes some filters less useful. The `blob:limit`
filter for example filters blobs such that only those which are smaller
than the given limit are returned. But it is unfit to ask only for these
smallish blobs, given that git-rev-list(1) will continue to print tags,
commits and trees.

Now that we have the infrastructure in place to also filter tags and
commits, we can improve this situation by implementing a new filter
which selects objects based on their type. Above query can thus
trivially be implemented with the following command:

    $ git rev-list --objects --filter=object:type=blob \
        --filter=blob:limit=200

Furthermore, this filter allows to optimize for certain other cases: if
for example only tags or commits have been selected, there is no need to
walk down trees.

The new filter is not yet supported in bitmaps. This is going to be
implemented in a subsequent commit.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects: support filtering by tag and commit</title>
<updated>2021-04-12T16:35:50Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2021-04-12T13:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a2a4f95448890d138a800c8a55c5d5dcfe16082'/>
<id>urn:sha1:9a2a4f95448890d138a800c8a55c5d5dcfe16082</id>
<content type='text'>
Object filters currently only support filtering blobs or trees based on
some criteria. This commit lays the foundation to also allow filtering
of tags and commits.

No change in behaviour is expected from this commit given that there are
no filters yet for those object types.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CALLOC_ARRAY</title>
<updated>2021-03-14T00:00:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-13T16:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca56dadb4b65ccaeab809d80db80a312dc00941a'/>
<id>urn:sha1:ca56dadb4b65ccaeab809d80db80a312dc00941a</id>
<content type='text'>
Add and apply a semantic patch for converting code that open-codes
CALLOC_ARRAY to use it instead.  It shortens the code and infers the
element size automatically.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object-name.c: rename from sha1-name.c</title>
<updated>2021-01-04T21:01:55Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-12-31T11:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e6771e5046232e448e2dde4f0fee1752c9e1d04'/>
<id>urn:sha1:1e6771e5046232e448e2dde4f0fee1752c9e1d04</id>
<content type='text'>
Generalize the last remnants of "sha" and "sha1" in this file and rename
it to reflect that we're not just able to handle SHA-1 these days.

We need to update one test to check for an updated error string.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: treat NULL filter_options as "disabled"</title>
<updated>2020-05-05T04:57:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-05-04T23:12:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bf7f1eaa51b3f35161e1c9e4d8bc843330dea3c'/>
<id>urn:sha1:5bf7f1eaa51b3f35161e1c9e4d8bc843330dea3c</id>
<content type='text'>
In most callers, we have an actual list_objects_filter_options struct,
and if no filtering is desired its "choice" element will be
LOFC_DISABLED. However, some code may have only a pointer to such a
struct which may be NULL (because _their_ callers didn't care about
filtering, either). Rather than forcing them to handle this explicitly
like:

  if (filter_options)
          traverse_commit_list_filtered(filter_options, revs,
	                                show_commit, show_object,
					show_data, NULL);
  else
          traverse_commit_list(revs, show_commit, show_object,
	                             show_data);

let's just treat a NULL filter_options the same as LOFC_DISABLED. We
only need a small change, since that option struct is converted into a
real filter only in the "init" function.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
