<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/pack-objects.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-08-26T18:16:25Z</updated>
<entry>
<title>Merge branch 'jk/pack-shallow-always-without-bitmap'</title>
<updated>2014-08-26T18:16:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-08-26T18:16:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3d54f9a1fa481727a849b8753fc9d1abafe6583'/>
<id>urn:sha1:a3d54f9a1fa481727a849b8753fc9d1abafe6583</id>
<content type='text'>
Reachability bitmaps do not work with shallow operations.
Fixes regression in 2.0.

* jk/pack-shallow-always-without-bitmap:
  pack-objects: turn off bitmaps when we see --shallow lines
</content>
</entry>
<entry>
<title>pack-objects: turn off bitmaps when we see --shallow lines</title>
<updated>2014-08-12T19:17:19Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-12T04:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f7f91086a376ba53f8270ea80b7bbbd8274c3c2d'/>
<id>urn:sha1:f7f91086a376ba53f8270ea80b7bbbd8274c3c2d</id>
<content type='text'>
Reachability bitmaps do not work with shallow operations,
because they cache a view of the object reachability that
represents the true objects. Whereas a shallow repository
(or a shallow operation in a repository) is inherently
cutting off the object graph with a graft.

We explicitly disallow the use of bitmaps in shallow
repositories by checking is_repository_shallow(), and we
should continue to do that. However, we also want to
disallow bitmaps when we are serving a fetch to a shallow
client, since we momentarily take on their grafted view of
the world.

It used to be enough to call is_repository_shallow at the
start of pack-objects.  Upload-pack wrote the other side's
shallow state to a temporary file and pointed the whole
pack-objects process at this state with "git --shallow-file",
and from the perspective of pack-objects, we really were
in a shallow repo.  But since b790e0f (upload-pack: send
shallow info over stdin to pack-objects, 2014-03-11), we do
it differently: we send --shallow lines to pack-objects over
stdin, and it registers them itself.

This means that our is_repository_shallow check is way too
early (we have not been told about the shallowness yet), and
that it is insufficient (calling is_repository_shallow is
not enough, as the shallow grafts we register do not change
its return value). Instead, we can just turn off bitmaps
explicitly when we see these lines.

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>Merge branch 'jk/repack-pack-writebitmaps-config'</title>
<updated>2014-06-25T19:23:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-25T19:23:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25f3119000ab8b98cb54e9925f4e307a5dab2f87'/>
<id>urn:sha1:25f3119000ab8b98cb54e9925f4e307a5dab2f87</id>
<content type='text'>
* jk/repack-pack-writebitmaps-config:
  t7700: drop explicit --no-pack-kept-objects from .keep test
  repack: introduce repack.writeBitmaps config option
  repack: simplify handling of --write-bitmap-index
  pack-objects: stop respecting pack.writebitmaps
</content>
</entry>
<entry>
<title>pack-objects: stop respecting pack.writebitmaps</title>
<updated>2014-06-10T21:01:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-10T20:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15a906c5e99fc34534fd40d61590da142dee71d2'/>
<id>urn:sha1:15a906c5e99fc34534fd40d61590da142dee71d2</id>
<content type='text'>
The handling of the pack.writebitmaps config option
originally happened in pack-objects, which is quite
low-level. It would make more sense for drivers of
pack-objects to read the config, and then manipulate
pack-objects with command-line options.

Recently, repack learned to do so, making the low-level read
of pack.writebitmaps redundant here. Other callers, like
upload-pack, would not generally want to write bitmaps
anyway.

This could be considered a regression for somebody who is
driving pack-objects themselves outside of repack and
expects the config option to be used. However, such users
seem rather unlikely given how new the bitmap code is (and
the fact that they would basically be reimplementing repack
in the first place).

Note that we do not do anything with pack.writeBitmapHashCache
here. That option is not about "do we write bimaps", but
rather "when we are writing bitmaps, how do we do it?". You
would want that to kick in anytime you decide to write them,
similar to how pack.indexVersion is used.

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>Merge branch 'jk/pack-bitmap'</title>
<updated>2014-04-08T19:00:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-08T19:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=967f8c918465312cc6cc1bcbcfacafcf95152bd8'/>
<id>urn:sha1:967f8c918465312cc6cc1bcbcfacafcf95152bd8</id>
<content type='text'>
* jk/pack-bitmap:
  pack-objects: do not reuse packfiles without --delta-base-offset
  add `ignore_missing_links` mode to revwalk
</content>
</entry>
<entry>
<title>Merge branch 'jl/nor-or-nand-and'</title>
<updated>2014-04-08T19:00:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-08T19:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d59c12d7ad39f942fc60578ba1e934822f40445b'/>
<id>urn:sha1:d59c12d7ad39f942fc60578ba1e934822f40445b</id>
<content type='text'>
Eradicate mistaken use of "nor" (that is, essentially "nor" used
not in "neither A nor B" ;-)) from in-code comments, command output
strings, and documentations.

* jl/nor-or-nand-and:
  code and test: fix misuses of "nor"
  comments: fix misuses of "nor"
  contrib: fix misuses of "nor"
  Documentation: fix misuses of "nor"
</content>
</entry>
<entry>
<title>pack-objects: do not reuse packfiles without --delta-base-offset</title>
<updated>2014-04-04T22:29:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-04-02T06:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69e4b3426a608b4965c1cb0c6eab5252d880178b'/>
<id>urn:sha1:69e4b3426a608b4965c1cb0c6eab5252d880178b</id>
<content type='text'>
When we are sending a packfile to a remote, we currently try
to reuse a whole chunk of packfile without bothering to look
at the individual objects. This can make things like initial
clones much lighter on the server, as we can just dump the
packfile bytes.

However, it's possible that the other side cannot read our
packfile verbatim. For example, we may have objects stored
as OFS_DELTA, but the client is an antique version of git
that only understands REF_DELTA. We negotiate this
capability over the fetch protocol. A normal pack-objects
run will convert OFS_DELTA into REF_DELTA on the fly, but
the "reuse pack" code path never even looks at the objects.

This patch disables packfile reuse if the other side is
missing any capabilities that we might have used in the
on-disk pack. Right now the only one is OFS_DELTA, but we
may need to expand in the future (e.g., if packv4 introduces
new object types).

We could be more thorough and only disable reuse in this
case when we actually have an OFS_DELTA to send, but:

  1. We almost always will have one, since we prefer
     OFS_DELTA to REF_DELTA when possible. So this case
     would almost never come up.

  2. Looking through the objects defeats the purpose of the
     optimization, which is to do as little work as possible
     to get the bytes to the remote.

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>comments: fix misuses of "nor"</title>
<updated>2014-03-31T22:29:27Z</updated>
<author>
<name>Justin Lebar</name>
<email>jlebar@google.com</email>
</author>
<published>2014-03-31T22:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01689909eb9f8366583c44b325d8d9ba259a2538'/>
<id>urn:sha1:01689909eb9f8366583c44b325d8d9ba259a2538</id>
<content type='text'>
Signed-off-by: Justin Lebar &lt;jlebar@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/pack-bitmap-progress'</title>
<updated>2014-03-28T20:50:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-28T20:50:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ddcc9cfbadfca928334bbd008ad2365e1543f45'/>
<id>urn:sha1:0ddcc9cfbadfca928334bbd008ad2365e1543f45</id>
<content type='text'>
The progress output while repacking and transferring objects showed
an apparent large silence while writing the objects out of existing
packfiles, when the reachability bitmap was in use.

* jk/pack-bitmap-progress:
  pack-objects: show reused packfile objects in "Counting objects"
  pack-objects: show progress for reused packfiles
</content>
</entry>
<entry>
<title>Merge branch 'jk/pack-bitmap'</title>
<updated>2014-03-28T20:50:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-28T20:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e2450e1245cdbcb709e841069039077ab0a2a96a'/>
<id>urn:sha1:e2450e1245cdbcb709e841069039077ab0a2a96a</id>
<content type='text'>
Instead of dying when asked to (re)pack with the reachability
bitmap when a bitmap cannot be built, just (re)pack without
producing a bitmap in such a case, with a warning.

* jk/pack-bitmap:
  pack-objects: turn off bitmaps when skipping objects
</content>
</entry>
</feed>
