<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-bitmap.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-05-13T21:05:56Z</updated>
<entry>
<title>Merge branch 'sb/test-bitmap-free-at-end' into maint</title>
<updated>2015-05-13T21:05:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-13T21:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=071e93a14844f474d313eec1a035816192616889'/>
<id>urn:sha1:071e93a14844f474d313eec1a035816192616889</id>
<content type='text'>
* sb/test-bitmap-free-at-end:
  pack-bitmap.c: fix a memleak
</content>
</entry>
<entry>
<title>pack-bitmap.c: fix a memleak</title>
<updated>2015-04-13T04:45:27Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-03-31T01:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f86a3747abc742359397e3050b1fbef297415de5'/>
<id>urn:sha1:f86a3747abc742359397e3050b1fbef297415de5</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/unused-symbols'</title>
<updated>2015-02-11T21:44:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c985aaf87909ab7f8194b3cfed3a744cbff78fe9'/>
<id>urn:sha1:c985aaf87909ab7f8194b3cfed3a744cbff78fe9</id>
<content type='text'>
Mark file-local symbols as "static", and drop functions that nobody
uses.

* jc/unused-symbols:
  shallow.c: make check_shallow_file_for_update() static
  remote.c: make clear_cas_option() static
  urlmatch.c: make match_urls() static
  revision.c: make save_parents() and free_saved_parents() static
  line-log.c: make line_log_data_init() static
  pack-bitmap.c: make pack_bitmap_filename() static
  prompt.c: remove git_getpass() nobody uses
  http.c: make finish_active_slot() and handle_curl_result() static
</content>
</entry>
<entry>
<title>Merge branch 'ak/typofixes'</title>
<updated>2015-02-11T21:37:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:37:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14f563031d21a26aa28a08f795c6d2c36580a7bf'/>
<id>urn:sha1:14f563031d21a26aa28a08f795c6d2c36580a7bf</id>
<content type='text'>
* ak/typofixes:
  t/lib-terminal.sh: fix typo
  pack-bitmap: fix typo
</content>
</entry>
<entry>
<title>pack-bitmap: fix typo</title>
<updated>2015-01-21T20:40:05Z</updated>
<author>
<name>Alexander Kuleshov</name>
<email>kuleshovmail@gmail.com</email>
</author>
<published>2015-01-21T09:13:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25143a54fcc14273ed03b0cb77b6187f20d6069d'/>
<id>urn:sha1:25143a54fcc14273ed03b0cb77b6187f20d6069d</id>
<content type='text'>
Signed-off-by: Alexander Kuleshov &lt;kuleshovmail@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-bitmap.c: make pack_bitmap_filename() static</title>
<updated>2015-01-15T19:04:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T23:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb4680500a3e72e0d5811659f9e4f46c8df91696'/>
<id>urn:sha1:cb4680500a3e72e0d5811659f9e4f46c8df91696</id>
<content type='text'>
Reviewed-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-12-12T22:31:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-12T22:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3889e7a60c65031f0c5381d8060cefb4294d932e'/>
<id>urn:sha1:3889e7a60c65031f0c5381d8060cefb4294d932e</id>
<content type='text'>
* jk/pack-bitmap:
  pack-bitmap: do not use gcc packed attribute
</content>
</entry>
<entry>
<title>pack-bitmap: do not use gcc packed attribute</title>
<updated>2014-12-01T02:07:34Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2014-11-27T05:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5007211b6582fc38647ff695b5ac51541ea9de8'/>
<id>urn:sha1:b5007211b6582fc38647ff695b5ac51541ea9de8</id>
<content type='text'>
The "__attribute__" flag may be a noop on some compilers.
That's OK as long as the code is correct without the
attribute, but in this case it is not. We would typically
end up with a struct that is 2 bytes too long due to struct
padding, breaking both reading and writing of bitmaps.

Instead of marshalling the data in a struct, let's just
provide helpers for reading and writing the appropriate
types. Besides being correct on all platforms, the result is
more efficient and simpler to read.

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
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>use REALLOC_ARRAY for changing the allocation size of arrays</title>
<updated>2014-09-18T16:13:42Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-09-16T18:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2756ca4347cbda05b16954cd7f445c216b935e76'/>
<id>urn:sha1:2756ca4347cbda05b16954cd7f445c216b935e76</id>
<content type='text'>
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>add `ignore_missing_links` mode to revwalk</title>
<updated>2014-04-04T20:31:38Z</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2014-03-28T10:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2db1a43f41880bb4aeea9dee8a7d13c5ad76db3f'/>
<id>urn:sha1:2db1a43f41880bb4aeea9dee8a7d13c5ad76db3f</id>
<content type='text'>
When pack-objects is computing the reachability bitmap to
serve a fetch request, it can erroneously die() if some of
the UNINTERESTING objects are not present. Upload-pack
throws away HAVE lines from the client for objects we do not
have, but we may have a tip object without all of its
ancestors (e.g., if the tip is no longer reachable and was
new enough to survive a `git prune`, but some of its
reachable objects did get pruned).

In the non-bitmap case, we do a revision walk with the HAVE
objects marked as UNINTERESTING. The revision walker
explicitly ignores errors in accessing UNINTERESTING commits
to handle this case (and we do not bother looking at
UNINTERESTING trees or blobs at all).

When we have bitmaps, however, the process is quite
different.  The bitmap index for a pack-objects run is
calculated in two separate steps:

First, we perform an extensive walk from all the HAVEs to
find the full set of objects reachable from them. This walk
is usually optimized away because we are expected to hit an
object with a bitmap during the traversal, which allows us
to terminate early.

Secondly, we perform an extensive walk from all the WANTs,
which usually also terminates early because we hit a commit
with an existing bitmap.

Once we have the resulting bitmaps from the two walks, we
AND-NOT them together to obtain the resulting set of objects
we need to pack.

When we are walking the HAVE objects, the revision walker
does not know that we are walking it only to mark the
results as uninteresting. We strip out the UNINTERESTING flag,
because those objects _are_ interesting to us during the
first walk. We want to keep going to get a complete set of
reachable objects if we can.

We need some way to tell the revision walker that it's OK to
silently truncate the HAVE walk, just like it does for the
UNINTERESTING case. This patch introduces a new
`ignore_missing_links` flag to the `rev_info` struct, which
we set only for the HAVE walk.

It also adds tests to cover UNINTERESTING objects missing
from several positions: a missing blob, a missing tree, and
a missing parent commit. The missing blob already worked (as
we do not care about its contents at all), but the other two
cases caused us to die().

Note that there are a few cases we do not need to test:

  1. We do not need to test a missing tree, with the blob
     still present. Without the tree that refers to it, we
     would not know that the blob is relevant to our walk.

  2. We do not need to test a tip commit that is missing.
     Upload-pack omits these for us (and in fact, we
     complain even in the non-bitmap case if it fails to do
     so).

Reported-by: Siddharth Agarwal &lt;sid0@fb.com&gt;
Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
