<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-objects.c, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-02-14T23:26:15Z</updated>
<entry>
<title>pack-objects: drop unused parameter from oe_map_new_pack()</title>
<updated>2019-02-14T23:26:15Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-02-14T05:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c409d108b857799ae699654d2fc33b063c9aef9d'/>
<id>urn:sha1:c409d108b857799ae699654d2fc33b063c9aef9d</id>
<content type='text'>
Since 43fa44fa3b (pack-objects: move in_pack out of struct object_entry,
2018-04-14), we store the source pack for each object as a small index
rather than as a pointer. When we see a new pack that has no allocated
index, we fall back to generating an array of pointers by calling
oe_map_new_pack().

Perhaps counter-intuitively, that function does not need to actually see
our new index-less pack. It only allocates and populates the array with
the existing packs, after which oe_set_in_pack() actually adds the new
pack to the array.

Let's drop the unused "struct packed_git" argument to oe_map_new_pack()
to avoid confusion.

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 'ph/pack-objects-mutex-fix'</title>
<updated>2019-02-05T22:26:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d243a323a545da68b87149e885f2e440f0b13725'/>
<id>urn:sha1:d243a323a545da68b87149e885f2e440f0b13725</id>
<content type='text'>
"git pack-objects" incorrectly used uninitialized mutex, which has
been corrected.

* ph/pack-objects-mutex-fix:
  pack-objects: merge read_lock and lock in packing_data struct
  pack-objects: move read mutex to packing_data struct
</content>
</entry>
<entry>
<title>pack-objects: merge read_lock and lock in packing_data struct</title>
<updated>2019-01-28T19:22:12Z</updated>
<author>
<name>Patrick Hogg</name>
<email>phogg@novamoon.net</email>
</author>
<published>2019-01-25T00:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=edb673cf1001eeff140370c41139aaa06e67cea0'/>
<id>urn:sha1:edb673cf1001eeff140370c41139aaa06e67cea0</id>
<content type='text'>
Rename the packing_data lock to obd_lock and upgrade it to a recursive
mutex to make it suitable for current read_lock usages. Additionally
remove the superfluous #ifndef NO_PTHREADS guard around mutex
initialization in prepare_packing_data as the mutex functions
themselves are already protected.

Signed-off-by: Patrick Hogg &lt;phogg@novamoon.net&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-objects: move read mutex to packing_data struct</title>
<updated>2019-01-28T19:22:06Z</updated>
<author>
<name>Patrick Hogg</name>
<email>phogg@novamoon.net</email>
</author>
<published>2019-01-25T00:22:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=459307b139c9a859ca0b6ca5276cf9be3d2b8e3e'/>
<id>urn:sha1:459307b139c9a859ca0b6ca5276cf9be3d2b8e3e</id>
<content type='text'>
ac77d0c37 ("pack-objects: shrink size field in struct object_entry",
2018-04-14) added an extra usage of read_lock/read_unlock in the newly
introduced oe_get_size_slow for thread safety in parallel calls to
try_delta(). Unfortunately oe_get_size_slow is also used in serial
code, some of which is called before the first invocation of
ll_find_deltas. As such the read mutex is not guaranteed to be
initialized.

Resolve this by moving the read mutex to packing_data and initializing
it in prepare_packing_data which is initialized in cmd_pack_objects.

Signed-off-by: Patrick Hogg &lt;phogg@novamoon.net&gt;
Reviewed-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-*.c: remove the_repository references</title>
<updated>2018-11-12T05:50:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-10T05:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c14112741b81366cfbbc3b98e0b92422fcce83d'/>
<id>urn:sha1:7c14112741b81366cfbbc3b98e0b92422fcce83d</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>Merge branch 'js/pack-objects-mutex-init-fix'</title>
<updated>2018-10-30T06:43:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-30T06:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=620b00e1671a8b4c1b00dbea8a0e81a657f28ce1'/>
<id>urn:sha1:620b00e1671a8b4c1b00dbea8a0e81a657f28ce1</id>
<content type='text'>
A mutex used in "git pack-objects" were not correctly initialized
and this caused "git repack" to dump core on Windows.

* js/pack-objects-mutex-init-fix:
  pack-objects (mingw): initialize `packing_data` mutex in the correct spot
  pack-objects (mingw): demonstrate a segmentation fault with large deltas
  pack-objects: fix typo 'detla' -&gt; 'delta'
</content>
</entry>
<entry>
<title>pack-objects (mingw): initialize `packing_data` mutex in the correct spot</title>
<updated>2018-10-19T05:28:44Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-10-16T21:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34204c81668324480e1f34a09cce9c21fabf4b40'/>
<id>urn:sha1:34204c81668324480e1f34a09cce9c21fabf4b40</id>
<content type='text'>
In 9ac3f0e5b3e4 (pack-objects: fix performance issues on packing large
deltas, 2018-07-22), a mutex was introduced that is used to guard the
call to set the delta size. This commit even added code to initialize
it, but at an incorrect spot: in `init_threaded_search()`, while the
call to `oe_set_delta_size()` (and hence to `packing_data_lock()`) can
happen in the call chain `check_object()` &lt;- `get_object_details()` &lt;-
`prepare_pack()` &lt;- `cmd_pack_objects()`, which is long before the
`prepare_pack()` function calls `ll_find_deltas()` (which initializes
the threaded search).

Another tell-tale that the mutex was initialized in an incorrect spot is
that the function to initialize it lives in builtin/, while the code
that uses the mutex is defined in a libgit.a header file.

Let's use a more appropriate function: `prepare_packing_data()`, which
not only lives in libgit.a, but *has* to be called before the
`packing_data` struct is used that contains that mutex.

This fixes https://github.com/git-for-windows/git/issues/1839.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/cocci'</title>
<updated>2018-09-17T20:53:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3'/>
<id>urn:sha1:769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3</id>
<content type='text'>
spatch transformation to replace boolean uses of !hashcmp() to
newly introduced oideq() is added, and applied, to regain
performance lost due to support of multiple hash algorithms.

* jk/cocci:
  show_dirstat: simplify same-content check
  read-cache: use oideq() in ce_compare functions
  convert hashmap comparison functions to oideq()
  convert "hashcmp() != 0" to "!hasheq()"
  convert "oidcmp() != 0" to "!oideq()"
  convert "hashcmp() == 0" to hasheq()
  convert "oidcmp() == 0" to oideq()
  introduce hasheq() and oideq()
  coccinelle: use &lt;...&gt; for function exclusion
</content>
</entry>
<entry>
<title>Merge branch 'cc/delta-islands'</title>
<updated>2018-09-17T20:53:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3504ea3dd21b0a6d38bcd369efa0663cdc05416'/>
<id>urn:sha1:f3504ea3dd21b0a6d38bcd369efa0663cdc05416</id>
<content type='text'>
Lift code from GitHub to restrict delta computation so that an
object that exists in one fork is not made into a delta against
another object that does not appear in the same forked repository.

* cc/delta-islands:
  pack-objects: move 'layer' into 'struct packing_data'
  pack-objects: move tree_depth into 'struct packing_data'
  t5320: tests for delta islands
  repack: add delta-islands support
  pack-objects: add delta-islands support
  pack-objects: refactor code into compute_layer_order()
  Add delta-islands.{c,h}
</content>
</entry>
<entry>
<title>Merge branch 'jk/pack-delta-reuse-with-bitmap'</title>
<updated>2018-09-17T20:53:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ebdef2e1b4c89fd193140b36c04b41eb7f9a86d'/>
<id>urn:sha1:3ebdef2e1b4c89fd193140b36c04b41eb7f9a86d</id>
<content type='text'>
When creating a thin pack, which allows objects to be made into a
delta against another object that is not in the resulting pack but
is known to be present on the receiving end, the code learned to
take advantage of the reachability bitmap; this allows the server
to send a delta against a base beyond the "boundary" commit.

* jk/pack-delta-reuse-with-bitmap:
  pack-objects: reuse on-disk deltas for thin "have" objects
  pack-bitmap: save "have" bitmap from walk
  t/perf: add perf tests for fetches from a bitmapped server
  t/perf: add infrastructure for measuring sizes
  t/perf: factor out percent calculations
  t/perf: factor boilerplate out of test_perf
</content>
</entry>
</feed>
