<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/pack-objects.c, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-17T23:01:26Z</updated>
<entry>
<title>Merge branch 'rs/deflate-init-cleanup'</title>
<updated>2015-03-17T23:01:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-17T23:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6902c4da5855cead535b280a1734771a6fac90e4'/>
<id>urn:sha1:6902c4da5855cead535b280a1734771a6fac90e4</id>
<content type='text'>
Code simplification.

* rs/deflate-init-cleanup:
  zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}
</content>
</entry>
<entry>
<title>zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}</title>
<updated>2015-03-05T23:46:03Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2015-03-05T22:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a6f1287fb69c46c7895f987ffea558b13ae79d1'/>
<id>urn:sha1:9a6f1287fb69c46c7895f987ffea558b13ae79d1</id>
<content type='text'>
Clear the git_zstream variable at the start of git_deflate_init() etc.
so that callers don't have to do that.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-objects: use --objects-edge-aggressive for shallow repos</title>
<updated>2014-12-29T17:58:25Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2014-12-24T23:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2dacf26d0985521c0f30e535963a45257b63ea21'/>
<id>urn:sha1:2dacf26d0985521c0f30e535963a45257b63ea21</id>
<content type='text'>
When fetching into or pushing from a shallow repository, we want to
aggressively mark edges as uninteresting, since this decreases the pack
size.  However, aggressively marking edges can negatively affect
performance on large non-shallow repositories with lots of refs.

Teach pack-objects a --shallow option to indicate that we're pushing
from or fetching into a shallow repository.  Use
--objects-edge-aggressive only for shallow repositories and otherwise
use --objects-edge, which performs better in the general case.  Update
the callers to pass the --shallow option when they are dealing with a
shallow repository.

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>rev-list: add an option to mark fewer edges as uninteresting</title>
<updated>2014-12-29T17:57:55Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2014-12-24T23:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1684c1b219e02c91655ad929f752f4f864c72faf'/>
<id>urn:sha1:1684c1b219e02c91655ad929f752f4f864c72faf</id>
<content type='text'>
In commit fbd4a70 (list-objects: mark more commits as edges in
mark_edges_uninteresting - 2013-08-16), we marked an increasing number
of edges uninteresting.  This change, and the subsequent change to make
this conditional on --objects-edge, are used by --thin to make much
smaller packs for shallow clones.

Unfortunately, they cause a significant performance regression when
pushing non-shallow clones with lots of refs (23.322 seconds vs.
4.785 seconds with 22400 refs).  Add an option to git rev-list,
--objects-edge-aggressive, that preserves this more aggressive behavior,
while leaving --objects-edge to provide more performant behavior.
Preserve the current behavior for the moment by using the aggressive
option.

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 'jk/prune-mtime'</title>
<updated>2014-10-29T17:07:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-29T17:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d70e331c0e8eaeb0bd75ae3020c3be71de075ff7'/>
<id>urn:sha1:d70e331c0e8eaeb0bd75ae3020c3be71de075ff7</id>
<content type='text'>
Tighten the logic to decide that an unreachable cruft is
sufficiently old by covering corner cases such as an ancient object
becoming reachable and then going unreachable again, in which case
its retention period should be prolonged.

* jk/prune-mtime: (28 commits)
  drop add_object_array_with_mode
  revision: remove definition of unused 'add_object' function
  pack-objects: double-check options before discarding objects
  repack: pack objects mentioned by the index
  pack-objects: use argv_array
  reachable: use revision machinery's --indexed-objects code
  rev-list: add --indexed-objects option
  rev-list: document --reflog option
  t5516: test pushing a tag of an otherwise unreferenced blob
  traverse_commit_list: support pending blobs/trees with paths
  make add_object_array_with_context interface more sane
  write_sha1_file: freshen existing objects
  pack-objects: match prune logic for discarding objects
  pack-objects: refactor unpack-unreachable expiration check
  prune: keep objects reachable from recent objects
  sha1_file: add for_each iterators for loose and packed objects
  count-objects: use for_each_loose_file_in_objdir
  count-objects: do not use xsize_t when counting object size
  prune-packed: use for_each_loose_file_in_objdir
  reachable: mark index blobs as SEEN
  ...
</content>
</entry>
<entry>
<title>Merge branch 'eb/no-pthreads'</title>
<updated>2014-10-24T21:59:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-24T21:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4da4fbe0eea55c26f042f76df58bfc529b46ae0'/>
<id>urn:sha1:e4da4fbe0eea55c26f042f76df58bfc529b46ae0</id>
<content type='text'>
Allow us build with NO_PTHREADS=NoThanks compilation option.

* eb/no-pthreads:
  Handle atexit list internaly for unthreaded builds
  pack-objects: set number of threads before checking and warning
  index-pack: fix compilation with NO_PTHREADS
</content>
</entry>
<entry>
<title>Merge branch 'jk/pack-objects-no-bitmap-when-splitting'</title>
<updated>2014-10-24T21:56:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-24T21:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26a22d8d00e288dd4825f5d5d77d47473bdf3a6b'/>
<id>urn:sha1:26a22d8d00e288dd4825f5d5d77d47473bdf3a6b</id>
<content type='text'>
Splitting pack-objects output into multiple packs is incompatible
with the use of reachability bitmap.

* jk/pack-objects-no-bitmap-when-splitting:
  pack-objects: turn off bitmaps when we split packs
</content>
</entry>
<entry>
<title>pack-objects: turn off bitmaps when we split packs</title>
<updated>2014-10-19T22:08:38Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-17T01:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21134714787a02a37da15424d72c0119b2b8ed71'/>
<id>urn:sha1:21134714787a02a37da15424d72c0119b2b8ed71</id>
<content type='text'>
If a pack.packSizeLimit is set, we may split the pack data
across multiple packfiles. This means we cannot generate
.bitmap files, as they require that all of the reachable
objects are in the same pack. We check that condition when
we are generating the list of objects to pack (and disable
bitmaps if we are not packing everything), but we forgot to
update it when we notice that we needed to split (which
doesn't happen until the actual write phase).

The resulting bitmaps are quite bogus (they mention entries
that do not exist in the pack!) and can cause a fetch or
push to send insufficient objects.

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>pack-objects: double-check options before discarding objects</title>
<updated>2014-10-19T22:07:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-17T00:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b1e757f36377df1f2a6c165ebf171b09a8ad957b'/>
<id>urn:sha1:b1e757f36377df1f2a6c165ebf171b09a8ad957b</id>
<content type='text'>
When we are given an expiration time like
--unpack-unreachable=2.weeks.ago, we avoid writing out old,
unreachable loose objects entirely, under the assumption
that running "prune" would simply delete them immediately
anyway. However, this is only valid if we computed the same
set of reachable objects as prune would.

In practice, this is the case, because only git-repack uses
the --unpack-unreachable option with an expiration, and it
always feeds as many objects into the pack as possible. But
we can double-check at runtime just to be sure.

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>repack: pack objects mentioned by the index</title>
<updated>2014-10-19T22:07:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-17T00:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c90f9e13abae630551ada3e895633bdc2cf4e080'/>
<id>urn:sha1:c90f9e13abae630551ada3e895633bdc2cf4e080</id>
<content type='text'>
When we pack all objects, we use only the objects reachable
from references and reflogs. This misses any objects which
are reachable from the index, but not yet referenced.

By itself this isn't a big deal; the objects can remain
loose until they are actually used in a commit. However, it
does create a problem when we drop packed but unreachable
objects. We try to optimize out the writing of objects that
we will immediately prune, which means we must follow the
same rules as prune in determining what is reachable. And
prune uses the index for this purpose.

This is rather uncommon in practice, as objects in the index
would not usually have been packed in the first place. But
it could happen in a sequence like:

  1. You make a commit on a branch that references blob X.

  2. You repack, moving X into the pack.

  3. You delete the branch (and its reflog), so that X is
     unreferenced.

  4. You "git add" blob X so that it is now referenced only
     by the index.

  5. You repack again with git-gc. The pack-objects we
     invoke will see that X is neither referenced nor
     recent and not bother loosening it.

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