<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t5317-pack-objects-filter-objects.sh, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-05-29T18:05:34Z</updated>
<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>tests (pack-objects): use the full, unabbreviated `--revs` option</title>
<updated>2019-04-02T00:55:00Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-03-25T18:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=effc2bae642a08ea0cb4a9020cb57632d00ab1a0'/>
<id>urn:sha1:effc2bae642a08ea0cb4a9020cb57632d00ab1a0</id>
<content type='text'>
To use the singular form of a word, when the option wants the plural
form (and quietly expands it because it thinks it was abbreviated), is
an easy mistake to make, and t5317 contains almost two dozen of them.

However, using abbreviated options in tests is a bit fragile, so we will
disallow use of abbreviated options in our test suite.

In preparation for this change, let's fix
`t5317-pack-objects-filter-objects.sh`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'md/filter-trees'</title>
<updated>2018-10-30T06:43:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-30T06:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77d503757d6328703f9571a4432dd83800bc26bb'/>
<id>urn:sha1:77d503757d6328703f9571a4432dd83800bc26bb</id>
<content type='text'>
The "rev-list --filter" feature learned to exclude all trees via
"tree:0" filter.

* md/filter-trees:
  list-objects: support for skipping tree traversal
  filter-trees: code clean-up of tests
  list-objects-filter: implement filter tree:0
  list-objects-filter-options: do not over-strbuf_init
  list-objects-filter: use BUG rather than die
  revision: mark non-user-given objects instead
  rev-list: handle missing tree objects properly
  list-objects: always parse trees gently
  list-objects: refactor to process_tree_contents
  list-objects: store common func args in struct
</content>
</entry>
<entry>
<title>filter-trees: code clean-up of tests</title>
<updated>2018-10-15T03:43:17Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-12T20:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9e6d0942bb9f9fe9e4cca9670181e5b59074bcb'/>
<id>urn:sha1:d9e6d0942bb9f9fe9e4cca9670181e5b59074bcb</id>
<content type='text'>
A few trivial updates to test to match the current best practices.

 - avoid "grep -q" that strips potentially useful output from tests
   running under "-v".

 - use test_write_lines to prepare multi-line expected output file.

 - reserve use of test_must_fail to "git" commands.

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>rev-list: handle missing tree objects properly</title>
<updated>2018-10-06T23:55:00Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c0fe330d5f3d2fc7aac57a19c7580ea2543c799'/>
<id>urn:sha1:7c0fe330d5f3d2fc7aac57a19c7580ea2543c799</id>
<content type='text'>
Previously, we assumed only blob objects could be missing. This patch
makes rev-list handle missing trees like missing blobs. The --missing=*
and --exclude-promisor-objects flags now work for trees as they already
do for blobs. This is demonstrated in t6112.

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>tests: don't swallow Git errors upstream of pipes</title>
<updated>2018-10-06T23:51:18Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61de0ff695cf632f1a17fc0ebd4401bde2f7fa8f'/>
<id>urn:sha1:61de0ff695cf632f1a17fc0ebd4401bde2f7fa8f</id>
<content type='text'>
Some pipes in tests lose the exit code of git processes, which can mask
unexpected behavior like crashes. Split these pipes up so that git
commands are only at the end of pipes rather than the beginning or
middle.

The violations fixed in this patch were found in the process of fixing
pipe placement in a prior patch.

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>t/*: fix ordering of expected/observed arguments</title>
<updated>2018-10-06T23:51:18Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dcbaa0b361f5bebcbe6eca446819fadd02083461'/>
<id>urn:sha1:dcbaa0b361f5bebcbe6eca446819fadd02083461</id>
<content type='text'>
Fix various places where the ordering was obviously wrong, meaning it
was easy to find with grep.

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>tests: standardize pipe placement</title>
<updated>2018-10-06T23:51:18Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2018-10-05T21:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bdbc17e86abe2471c4bd0d52cdc004835cb7bb3e'/>
<id>urn:sha1:bdbc17e86abe2471c4bd0d52cdc004835cb7bb3e</id>
<content type='text'>
Instead of using a line-continuation and pipe on the second line, take
advantage of the shell's implicit line continuation after a pipe
character.  So for example, instead of

	some long line \
		| next line

use

	some long line |
	next line

And add a blank line before and after the pipe where it aids readability
(it usually does).

This better matches the coding style documented in
Documentation/CodingGuidelines and used in shell scripts elsewhere in
the tree.

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>upload-pack: send refs' objects despite "filter"</title>
<updated>2018-07-09T19:37:38Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-07-06T19:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0c9016abd566e9a8f988dcd387663cd0b2be078'/>
<id>urn:sha1:a0c9016abd566e9a8f988dcd387663cd0b2be078</id>
<content type='text'>
A filter line in a request to upload-pack filters out objects regardless
of whether they are directly referenced by a "want" line or not. This
means that cloning with "--filter=blob:none" (or another filter that
excludes blobs) from a repository with at least one ref pointing to a
blob (for example, the Git repository itself) results in output like the
following:

    error: missing object referenced by 'refs/tags/junio-gpg-pub'

and if that particular blob is not referenced by a fetched tree, the
resulting clone fails fsck because there is no object from the remote to
vouch that the missing object is a promisor object.

Update both the protocol and the upload-pack implementation to include
all explicitly specified "want" objects in the packfile regardless of
the filter specification.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
