<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/packfile.h, 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-07-19T18:30:19Z</updated>
<entry>
<title>Merge branch 'ds/midx-expire-repack'</title>
<updated>2019-07-19T18:30:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-19T18:30:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4308d81d456c8c3ecc2c33af7f4d834de95130b9'/>
<id>urn:sha1:4308d81d456c8c3ecc2c33af7f4d834de95130b9</id>
<content type='text'>
"git multi-pack-index" learned expire and repack subcommands.

* ds/midx-expire-repack:
  t5319: use 'test-tool path-utils' instead of 'ls -l'
  t5319-multi-pack-index.sh: test batch size zero
  midx: add test that 'expire' respects .keep files
  multi-pack-index: test expire while adding packs
  midx: implement midx_repack()
  multi-pack-index: prepare 'repack' subcommand
  multi-pack-index: implement 'expire' subcommand
  midx: refactor permutation logic and pack sorting
  midx: simplify computation of pack name lengths
  multi-pack-index: prepare for 'expire' subcommand
  Docs: rearrange subcommands for multi-pack-index
  repack: refactor pack deletion for future use
</content>
</entry>
<entry>
<title>Merge branch 'ds/close-object-store'</title>
<updated>2019-07-09T22:25:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cb7c73589059b557f0d690ed6bcfde46ef2d234'/>
<id>urn:sha1:5cb7c73589059b557f0d690ed6bcfde46ef2d234</id>
<content type='text'>
The commit-graph file is now part of the "files that the runtime
may keep open file descriptors on, all of which would need to be
closed when done with the object store", and the file descriptor to
an existing commit-graph file now is closed before "gc" finalizes a
new instance to replace it.

* ds/close-object-store:
  packfile: rename close_all_packs to close_object_store
  packfile: close commit-graph in close_all_packs
  commit-graph: use raw_object_store when closing
</content>
</entry>
<entry>
<title>packfile: rename close_all_packs to close_object_store</title>
<updated>2019-06-12T18:33:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-05-17T18:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d511cfc0bfe1d2b98ba8b272ddd9ba83e84e5f8'/>
<id>urn:sha1:2d511cfc0bfe1d2b98ba8b272ddd9ba83e84e5f8</id>
<content type='text'>
The close_all_packs() method is now responsible for more than just pack-files.
It also closes the commit-graph and the multi-pack-index. Rename the function
to be more descriptive of its larger role. The name also fits because the
input parameter is a raw_object_store.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>repack: refactor pack deletion for future use</title>
<updated>2019-06-11T17:34:40Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-10T23:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8434e85d5f9602a82f6b34ba82a9cb9e559a2d3b'/>
<id>urn:sha1:8434e85d5f9602a82f6b34ba82a9cb9e559a2d3b</id>
<content type='text'>
The repack builtin deletes redundant pack-files and their
associated .idx, .promisor, .bitmap, and .keep files. We will want
to re-use this logic in the future for other types of repack, so
pull the logic into 'unlink_pack_path()' in packfile.c.

The 'ignore_keep' parameter is enabled for the use in repack, but
will be important for a future caller.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/sha1-name-c-wo-the-repository'</title>
<updated>2019-05-08T15:37:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b179f3175d1a152b1d22ce8352efda34b258ce2'/>
<id>urn:sha1:0b179f3175d1a152b1d22ce8352efda34b258ce2</id>
<content type='text'>
Further code clean-up to allow the lowest level of name-to-object
mapping layer to work with a passed-in repository other than the
default one.

* nd/sha1-name-c-wo-the-repository: (34 commits)
  sha1-name.c: remove the_repo from get_oid_mb()
  sha1-name.c: remove the_repo from other get_oid_*
  sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name
  submodule-config.c: use repo_get_oid for reading .gitmodules
  sha1-name.c: add repo_get_oid()
  sha1-name.c: remove the_repo from get_oid_with_context_1()
  sha1-name.c: remove the_repo from resolve_relative_path()
  sha1-name.c: remove the_repo from diagnose_invalid_index_path()
  sha1-name.c: remove the_repo from handle_one_ref()
  sha1-name.c: remove the_repo from get_oid_1()
  sha1-name.c: remove the_repo from get_oid_basic()
  sha1-name.c: remove the_repo from get_describe_name()
  sha1-name.c: remove the_repo from get_oid_oneline()
  sha1-name.c: add repo_interpret_branch_name()
  sha1-name.c: remove the_repo from interpret_branch_mark()
  sha1-name.c: remove the_repo from interpret_nth_prior_checkout()
  sha1-name.c: remove the_repo from get_short_oid()
  sha1-name.c: add repo_for_each_abbrev()
  sha1-name.c: store and use repo in struct disambiguate_state
  sha1-name.c: add repo_find_unique_abbrev_r()
  ...
</content>
</entry>
<entry>
<title>Merge branch 'jk/server-info-rabbit-hole'</title>
<updated>2019-04-25T07:41:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=776f3e1fb73a6440804aa3dde4ffd3b6bdf60a19'/>
<id>urn:sha1:776f3e1fb73a6440804aa3dde4ffd3b6bdf60a19</id>
<content type='text'>
Code clean-up around a much-less-important-than-it-used-to-be
update_server_info() funtion.

* jk/server-info-rabbit-hole:
  update_info_refs(): drop unused force parameter
  server-info: drop objdirlen pointer arithmetic
  server-info: drop nr_alloc struct member
  server-info: use strbuf to read old info/packs file
  server-info: simplify cleanup in parse_pack_def()
  server-info: fix blind pointer arithmetic
  http: simplify parsing of remote objects/info/packs
  packfile: fix pack basename computation
  midx: check both pack and index names for containment
  t5319: drop useless --buffer from cat-file
  t5319: fix bogus cat-file argument
  pack-revindex: open index if necessary
  packfile.h: drop extern from function declarations
</content>
</entry>
<entry>
<title>packfile: fix pack basename computation</title>
<updated>2019-04-16T07:58:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-04-05T18:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc78915674ff1bca1726348d7c434dfa0048a5d7'/>
<id>urn:sha1:fc78915674ff1bca1726348d7c434dfa0048a5d7</id>
<content type='text'>
When we have a multi-pack-index that covers many packfiles, we try to
avoid opening the .idx for those packfiles. To do that we feed the pack
name to midx_contains_pack(). But that function wants to see only the
basename, which we compute using strrchr() to find the final slash. But
that leaves an extra "/" at the start of our string.

We can fix this by incrementing the pointer. That also raises the
question of what to do when the name does not have a '/' at all. This
should generally not happen (we always find files in "pack/"), but it
doesn't hurt to be defensive here.

Let's wrap all of that up in a helper function and make it publicly
available, since a later patch will need to use it, too.

The tests don't notice because there's nothing about opening those .idx
files that would cause us to give incorrect output. It's just a little
slower. The new test checks this case by corrupting the covered .idx,
and then making sure we don't complain about it.

We also have to tweak t5570, which intentionally corrupts a .idx file
and expects us to notice it. When run with GIT_TEST_MULTI_PACK_INDEX,
this will fail since we now will (correctly) not bother opening the .idx
at all. We can fix that by unconditionally dropping any midx that's
there, which ensures we'll have to read the .idx.

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>packfile.h: drop extern from function declarations</title>
<updated>2019-04-16T07:58:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-04-05T18:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=336226c259f3fa2e2c9c1f5ce857f0c163b26928'/>
<id>urn:sha1:336226c259f3fa2e2c9c1f5ce857f0c163b26928</id>
<content type='text'>
As CodingGuidelines recommends, we do not need an "extern" when
declaring a public function. Let's drop these. Note that we leave the
extern on report_garbage(), as that is actually a function pointer, not
a function itself.

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>packfile.c: add repo_approximate_object_count()</title>
<updated>2019-04-08T08:26:32Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-04-06T11:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5038de19377ccc334c0ce3e1f206dddc20ac88c1'/>
<id>urn:sha1:5038de19377ccc334c0ce3e1f206dddc20ac88c1</id>
<content type='text'>
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>midx: during verify group objects by packfile to speed verification</title>
<updated>2019-03-22T05:31:11Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-03-21T19:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ae18df9d8ed27625f81974c3fb2db179a23ca2d'/>
<id>urn:sha1:5ae18df9d8ed27625f81974c3fb2db179a23ca2d</id>
<content type='text'>
Teach `multi-pack-index verify` to sort the set of object by
packfile so that only one packfile needs to be open at a time.

This is a performance improvement.  Previously, objects were
verified in OID order.  This essentially requires all packfiles
to be open at the same time.  If the number of packfiles exceeds
the open file limit, packfiles would be LRU-closed and re-opened
many times.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
