<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/cache-tree.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-20T21:03:05Z</updated>
<entry>
<title>cache-tree/blame: avoid reusing the DEBUG constant</title>
<updated>2019-06-20T21:03:05Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-06-19T21:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9b9cc56bbc0a223798c731798da1bee9f599cab'/>
<id>urn:sha1:e9b9cc56bbc0a223798c731798da1bee9f599cab</id>
<content type='text'>
In MS Visual C, the `DEBUG` constant is set automatically whenever
compiling with debug information.

This is clearly not what was intended in `cache-tree.c` nor in
`builtin/blame.c`, so let's use a less ambiguous name there.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
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 'jk/loose-object-cache-oid'</title>
<updated>2019-02-07T06:05:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-07T06:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cba595ab1a7764aecfde2e8e59994f89b2cd2f2e'/>
<id>urn:sha1:cba595ab1a7764aecfde2e8e59994f89b2cd2f2e</id>
<content type='text'>
Code clean-up.

* jk/loose-object-cache-oid:
  prefer "hash mismatch" to "sha1 mismatch"
  sha1-file: avoid "sha1 file" for generic use in messages
  sha1-file: prefer "loose object file" to "sha1 file" in messages
  sha1-file: drop has_sha1_file()
  convert has_sha1_file() callers to has_object_file()
  sha1-file: convert pass-through functions to object_id
  sha1-file: modernize loose header/stream functions
  sha1-file: modernize loose object file functions
  http: use struct object_id instead of bare sha1
  update comment references to sha1_object_info()
  sha1-file: fix outdated sha1 comment references
</content>
</entry>
<entry>
<title>Merge branch 'bc/tree-walk-oid'</title>
<updated>2019-01-29T20:47:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-29T20:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=371820d5f1bb3c3e691ad21cee652c02c36ea758'/>
<id>urn:sha1:371820d5f1bb3c3e691ad21cee652c02c36ea758</id>
<content type='text'>
The code to walk tree objects has been taught that we may be
working with object names that are not computed with SHA-1.

* bc/tree-walk-oid:
  cache: make oidcpy always copy GIT_MAX_RAWSZ bytes
  tree-walk: store object_id in a separate member
  match-trees: use hashcpy to splice trees
  match-trees: compute buffer offset correctly when splicing
  tree-walk: copy object ID before use
</content>
</entry>
<entry>
<title>tree-walk: store object_id in a separate member</title>
<updated>2019-01-15T17:57:41Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-01-15T00:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea82b2a0857e3e0449bdce4e3987dee6adbc51ae'/>
<id>urn:sha1:ea82b2a0857e3e0449bdce4e3987dee6adbc51ae</id>
<content type='text'>
When parsing a tree, we read the object ID directly out of the tree
buffer. This is normally fine, but such an object ID cannot be used with
oidcpy, which copies GIT_MAX_RAWSZ bytes, because if we are using SHA-1,
there may not be that many bytes to copy.

Instead, store the object ID in a separate struct member. Since we can
no longer efficiently compute the path length, store that information as
well in struct name_entry. Ensure we only copy the object ID into the
new buffer if the path length is nonzero, as some callers will pass us
an empty path with no object ID following it, and we will not want to
read past the end of the buffer.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/indentation-fix'</title>
<updated>2019-01-14T23:29:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-14T23:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2b6aa98be15458e4741274441541ee071e36f63'/>
<id>urn:sha1:f2b6aa98be15458e4741274441541ee071e36f63</id>
<content type='text'>
Code cleanup.

* nd/indentation-fix:
  Indent code with TABs
</content>
</entry>
<entry>
<title>convert has_sha1_file() callers to has_object_file()</title>
<updated>2019-01-08T17:41:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-01-07T08:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98374a07c98d1acc200c423b87495365a59cce0b'/>
<id>urn:sha1:98374a07c98d1acc200c423b87495365a59cce0b</id>
<content type='text'>
The only remaining callers of has_sha1_file() actually have an object_id
already. They can use the "object" variant, rather than dereferencing
the hash themselves.

The code changes here were completely generated by the included
coccinelle patch.

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>Indent code with TABs</title>
<updated>2018-12-09T03:37:32Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-12-06T15:42:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec36c42a6301eca8a1a038001435bc8a7940e886'/>
<id>urn:sha1:ec36c42a6301eca8a1a038001435bc8a7940e886</id>
<content type='text'>
We indent with TABs and sometimes for fine alignment, TABs followed by
spaces, but never all spaces (unless the indentation is less than 8
columns). Indenting with spaces slips through in some places. Fix
them.

Imported code and compat/ are left alone on purpose. The former should
remain as close as upstream as possible. The latter pretty much has
separate maintainers, it's up to them to decide.

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>cache-tree.c: remove the_repository references</title>
<updated>2018-11-12T05:50:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-10T05:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c207e9e1f6dd1802f0deadae51af5615d855edc4'/>
<id>urn:sha1:c207e9e1f6dd1802f0deadae51af5615d855edc4</id>
<content type='text'>
This case is more interesting than other boring "remove the_repo"
commits because while we need access to the object database, we cannot
simply use r-&gt;index because unpack-trees.c can operate on a temporary
index, not $GIT_DIR/index. Ideally we should be able to pass an object
database to lookup_tree() but that ship has sailed.

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>Merge branch 'jt/cache-tree-allow-missing-object-in-partial-clone'</title>
<updated>2018-10-19T04:34:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-19T04:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a08b1d62b0c58c795b3ddbe34ea1f68786b95c82'/>
<id>urn:sha1:a08b1d62b0c58c795b3ddbe34ea1f68786b95c82</id>
<content type='text'>
In a partial clone that will lazily be hydrated from the
originating repository, we generally want to avoid "does this
object exist (locally)?" on objects that we deliberately omitted
when we created the clone.  The cache-tree codepath (which is used
to write a tree object out of the index) however insisted that the
object exists, even for paths that are outside of the partial
checkout area.  The code has been updated to avoid such a check.

* jt/cache-tree-allow-missing-object-in-partial-clone:
  cache-tree: skip some blob checks in partial clone
</content>
</entry>
<entry>
<title>cache-tree: skip some blob checks in partial clone</title>
<updated>2018-10-10T01:20:43Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-10-09T18:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f215ff10bdf02f6c760ea34968fc39ae75ae449'/>
<id>urn:sha1:2f215ff10bdf02f6c760ea34968fc39ae75ae449</id>
<content type='text'>
In a partial clone, whenever a sparse checkout occurs, the existence of
all blobs in the index is verified, whether they are included or
excluded by the .git/info/sparse-checkout specification. This
significantly degrades performance because a lazy fetch occurs whenever
the existence of a missing blob is checked.

This is because cache_tree_update() checks the existence of all objects
in the index, whether or not CE_SKIP_WORKTREE is set on them. Teach
cache_tree_update() to skip checking CE_SKIP_WORKTREE objects when the
repository is a partial clone. This improves performance for sparse
checkout and also other operations that use cache_tree_update().

Instead of completely removing the check, an argument could be made that
the check should instead be replaced by a check that the blob is
promised, but for performance reasons, I decided not to do this.
If the user needs to verify the repository, it can be done using fsck
(which will notify if a tree points to a missing and non-promised blob,
whether the blob is included or excluded by the sparse-checkout
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>
