<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-bitmap.c, branch v2.7.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-11-20T13:02:05Z</updated>
<entry>
<title>Remove get_object_hash.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed1c9977cb1b63e4270ad8bdf967a2d02580aa08'/>
<id>urn:sha1:ed1c9977cb1b63e4270ad8bdf967a2d02580aa08</id>
<content type='text'>
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object.  This provides no
functional change, as it is essentially a macro substitution.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Convert struct object to object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2fd0760f62e79609fef7bfd7ecebb002e8e4ced'/>
<id>urn:sha1:f2fd0760f62e79609fef7bfd7ecebb002e8e4ced</id>
<content type='text'>
struct object is one of the major data structures dealing with object
IDs.  Convert it to use struct object_id instead of an unsigned char
array.  Convert get_object_hash to refer to the new member as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Add several uses of get_object_hash.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7999b2cf772956466baa8925491d6fb1b0963292'/>
<id>urn:sha1:7999b2cf772956466baa8925491d6fb1b0963292</id>
<content type='text'>
Convert most instances where the sha1 member of struct object is
dereferenced to use get_object_hash.  Most instances that are passed to
functions that have versions taking struct object_id, such as
get_sha1_hex/get_oid_hex, or instances that can be trivially converted
to use struct object_id instead, are not converted.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>use strip_suffix and xstrfmt to replace suffix</title>
<updated>2015-09-25T17:18:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ae97018fb2e7f30ab92fdc2965d1dcff2c5c296'/>
<id>urn:sha1:9ae97018fb2e7f30ab92fdc2965d1dcff2c5c296</id>
<content type='text'>
When we want to convert "foo.pack" to "foo.idx", we do it by
duplicating the original string and then munging the bytes
in place. Let's use strip_suffix and xstrfmt instead, which
has several advantages:

  1. It's more clear what the intent is.

  2. It does not implicitly rely on the fact that
     strlen(".idx") &lt;= strlen(".pack") to avoid an overflow.

  3. We communicate the assumption that the input file ends
     with ".pack" (and get a run-time check that this is so).

  4. We drop calls to strcpy, which makes auditing the code
     base easier.

Likewise, we can do this to convert ".pack" to ".bitmap",
avoiding some manual memory computation.

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 'es/osx-header-pollutes-mask-macro'</title>
<updated>2015-06-24T19:21:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-24T19:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6da9f888daab2d18c1e5ae8252f631d38fb80e8a'/>
<id>urn:sha1:6da9f888daab2d18c1e5ae8252f631d38fb80e8a</id>
<content type='text'>
* es/osx-header-pollutes-mask-macro:
  ewah: use less generic macro name
  ewah/bitmap: silence warning about MASK macro redefinition
</content>
</entry>
<entry>
<title>ewah: use less generic macro name</title>
<updated>2015-06-03T07:04:01Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-06-03T06:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34b935c01f28d34f6764f0e1140ad47e7abdde1b'/>
<id>urn:sha1:34b935c01f28d34f6764f0e1140ad47e7abdde1b</id>
<content type='text'>
The ewah/ewok.h header pollutes the global namespace with
"BITS_IN_WORD", without any specific notion that we are
talking about the bits in an eword_t. We can give this the
more specific name "BITS_IN_EWORD".

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/test-bitmap-free-at-end'</title>
<updated>2015-06-01T19:45:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-01T19:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3dc5ce0a5686ede82b7ee20c895372f61a74f839'/>
<id>urn:sha1:3dc5ce0a5686ede82b7ee20c895372f61a74f839</id>
<content type='text'>
An earlier leakfix to bitmap testing code was incomplete.

* sb/test-bitmap-free-at-end:
  test_bitmap_walk: free bitmap with bitmap_free
</content>
</entry>
<entry>
<title>Merge branch 'rs/plug-leak-in-pack-bitmaps'</title>
<updated>2015-05-26T20:24:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-26T20:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a26d48a46e8d7df58e7a91e7aac6795e29ddbd6d'/>
<id>urn:sha1:a26d48a46e8d7df58e7a91e7aac6795e29ddbd6d</id>
<content type='text'>
The code to read pack-bitmap wanted to allocate a few hundred
pointers to a structure, but by mistake allocated and leaked memory
enough to hold that many actual structures.  Correct the allocation
size and also have it on stack, as it is small enough.

* rs/plug-leak-in-pack-bitmaps:
  pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps
</content>
</entry>
<entry>
<title>test_bitmap_walk: free bitmap with bitmap_free</title>
<updated>2015-05-22T16:03:04Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-22T00:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d201a1ecdb1231a349d696a2252b7209ef7be103'/>
<id>urn:sha1:d201a1ecdb1231a349d696a2252b7209ef7be103</id>
<content type='text'>
Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)
noticed that we leak the "result" bitmap. But we should use
"bitmap_free" rather than straight "free", as the former
remembers to free the bitmap array pointed to by the struct.

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-bitmaps: plug memory leak, fix allocation size for recent_bitmaps</title>
<updated>2015-05-19T16:31:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2015-05-18T23:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=599dc766e89fe4f964c197f8d109dfc2e3c890ba'/>
<id>urn:sha1:599dc766e89fe4f964c197f8d109dfc2e3c890ba</id>
<content type='text'>
Use an automatic variable for recent_bitmaps, an array of pointers.
This way we don't allocate too much and don't have to free the memory
at the end.  The old code over-allocated because it reserved enough
memory to store all of the structs it is only pointing to and never
freed it.  160 64-bit pointers take up 1280 bytes, which is not too
much to be placed on the stack.

MAX_XOR_OFFSET is turned into a preprocessor constant to make it
constant enough for use in an non-variable array declaration.

Noticed-by: Stefan Beller &lt;stefanbeller@gmail.com&gt;
Suggested-by: Jeff King &lt;peff@peff.net&gt;
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>
</feed>
