<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-write.c, branch v2.31.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.31.7</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.31.7'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2021-03-01T22:02:57Z</updated>
<entry>
<title>Merge branch 'jt/transfer-fsck-across-packs'</title>
<updated>2021-03-01T22:02:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-01T22:02:57Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6ee353d42f389ec9454161b64ffbeb4167edebaa'/>
<id>urn:sha1:6ee353d42f389ec9454161b64ffbeb4167edebaa</id>
<content type='text'>
The approach to "fsck" the incoming objects in "index-pack" is
attractive for performance reasons (we have them already in core,
inflated and ready to be inspected), but fundamentally cannot be
applied fully when we receive more than one pack stream, as a tree
object in one pack may refer to a blob object in another pack as
".gitmodules", when we want to inspect blobs that are used as
".gitmodules" file, for example.  Teach "index-pack" to emit
objects that must be inspected later and check them in the calling
"fetch-pack" process.

* jt/transfer-fsck-across-packs:
  fetch-pack: print and use dangling .gitmodules
  fetch-pack: with packfile URIs, use index-pack arg
  http-fetch: allow custom index-pack args
  http: allow custom index-pack args
</content>
</entry>
<entry>
<title>fetch-pack: print and use dangling .gitmodules</title>
<updated>2021-02-22T20:07:40Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2021-02-22T19:20:09Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5476e1efded571e374cd97c7d69f17962ba1c44f'/>
<id>urn:sha1:5476e1efded571e374cd97c7d69f17962ba1c44f</id>
<content type='text'>
Teach index-pack to print dangling .gitmodules links after its "keep" or
"pack" line instead of declaring an error, and teach fetch-pack to check
such lines printed.

This allows the tree side of the .gitmodules link to be in one packfile
and the blob side to be in another without failing the fsck check,
because it is now fetch-pack which checks such objects after all
packfiles have been downloaded and indexed (and not index-pack on an
individual packfile, as it is before this commit).

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-write.c: prepare to write 'pack-*.rev' files</title>
<updated>2021-01-26T02:32:43Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2021-01-25T23:37:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=8ef50d9958f7be21e38026433d30f72521b4de47'/>
<id>urn:sha1:8ef50d9958f7be21e38026433d30f72521b4de47</id>
<content type='text'>
This patch prepares for callers to be able to write reverse index files
to disk.

It adds the necessary machinery to write a format-compliant .rev file
from within 'write_rev_file()', which is called from
'finish_tmp_packfile()'.

Similar to the process by which the reverse index is computed in memory,
these new paths also have to sort a list of objects by their offsets
within a packfile. These new paths use a qsort() (as opposed to a radix
sort), since our specialized radix sort requires a full revindex_entry
struct per object, which is more memory than we need to allocate.

The qsort is obviously slower, but the theoretical slowdown would
require a repository with a large amount of objects, likely implying
that the time spent in, say, pack-objects during a repack would dominate
the overall runtime.

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>pack-write: die on error in write_promisor_file()</title>
<updated>2021-01-15T01:02:22Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2021-01-14T15:50:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7c99bc23fcd69eeebf8a92263b5d90673c510a6a'/>
<id>urn:sha1:7c99bc23fcd69eeebf8a92263b5d90673c510a6a</id>
<content type='text'>
write_promisor_file() already uses xfopen(), so it would die
if the file cannot be opened for writing. To be consistent
with this behavior and not overlook issues, let's also die if
there are errors when we are actually writing to the file.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Suggested-by: Taylor Blau &lt;me@ttaylorr.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>fetch-pack: refactor writing promisor file</title>
<updated>2021-01-13T00:01:07Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2021-01-12T08:21:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=33add2ad7d6921489aa0cafd4a865504c3709512'/>
<id>urn:sha1:33add2ad7d6921489aa0cafd4a865504c3709512</id>
<content type='text'>
Let's replace the 2 different pieces of code that write a
promisor file in 'builtin/repack.c' and 'fetch-pack.c'
with a new function called 'write_promisor_file()' in
'pack-write.c' and 'pack.h'.

This might also help us in the future, if we want to put
back the ref names and associated hashes that were in
the promisor files we are repacking in 'builtin/repack.c'
as suggested by a NEEDSWORK comment just above the code
we are refactoring.

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>Merge branch 'rs/hashwrite-be64'</title>
<updated>2020-11-25T23:24:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-25T23:24:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=455e8d18f81583d0270685edc6ec2ed201fc984c'/>
<id>urn:sha1:455e8d18f81583d0270685edc6ec2ed201fc984c</id>
<content type='text'>
Code simplification.

* rs/hashwrite-be64:
  pack-write: use hashwrite_be64()
  midx: use hashwrite_be64()
  csum-file: add hashwrite_be64()
</content>
</entry>
<entry>
<title>pack-write: use hashwrite_be64()</title>
<updated>2020-11-12T17:40:10Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-12T12:23:10Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=970909c2a7803564f82ab1d3660d77ad6a44b68f'/>
<id>urn:sha1:970909c2a7803564f82ab1d3660d77ad6a44b68f</id>
<content type='text'>
Call hashwrite_be64() to write a 64-bit value instead of open-coding it
using htonl() and hashwrite().  This shortens the code, gets rid of a
buffer and several magic numbers, and makes the intent clearer.

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>pack-write: use hashwrite_be32() instead of double-buffering array</title>
<updated>2020-11-01T23:52:51Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-01T08:52:12Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=06d43fad18a2bb85b1a224b07c4cc572c7e41f7e'/>
<id>urn:sha1:06d43fad18a2bb85b1a224b07c4cc572c7e41f7e</id>
<content type='text'>
hashwrite() already buffers writes, so pass the fanout table entries
individually via hashwrite_be32(), which also does the endianess
conversion for us.  This avoids a memory copy, shortens the code and
reduces the number of magic numbers.

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>pack-write: use hashwrite_be32() in write_idx_file()</title>
<updated>2020-09-19T19:15:36Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-09-19T18:26:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=389cf68caf8bc79669133c8744b06092925461e0'/>
<id>urn:sha1:389cf68caf8bc79669133c8744b06092925461e0</id>
<content type='text'>
Call hashwrite_be32() instead of open-coding it.  This shortens the code
a bit and makes it easier to read.

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>Merge branch 'jb/doc-packfile-name' into master</title>
<updated>2020-07-31T04:34:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-07-31T04:34:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d61aed07bd0c61420879f42b4b961785ed1f742a'/>
<id>urn:sha1:d61aed07bd0c61420879f42b4b961785ed1f742a</id>
<content type='text'>
Doc update.

* jb/doc-packfile-name:
  pack-write/docs: update regarding pack naming
</content>
</entry>
</feed>
