<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/split-index.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-03-01T21:24:21Z</updated>
<entry>
<title>split-index: add {add,remove}_split_index() functions</title>
<updated>2017-03-01T21:24:21Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2017-02-27T18:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cef4fc7ebe869e910d0fd5643cd60328ed76356a'/>
<id>urn:sha1:cef4fc7ebe869e910d0fd5643cd60328ed76356a</id>
<content type='text'>
Also use the functions in cmd_update_index() in
builtin/update-index.c.

These functions will be used in a following commit to tweak
our use of the split-index feature depending on the setting
of a configuration variable.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>split-index: s/eith/with/ typo fix</title>
<updated>2016-11-01T18:48:02Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2016-10-23T09:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=753c4515016c762f2c23bf6243c77868631c8abe'/>
<id>urn:sha1:753c4515016c762f2c23bf6243c77868631c8abe</id>
<content type='text'>
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use COPY_ARRAY</title>
<updated>2016-09-25T23:44:13Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-25T07:24:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4'/>
<id>urn:sha1:45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4</id>
<content type='text'>
Add a semantic patch for converting certain calls of memcpy(3) to
COPY_ARRAY() and apply that transformation to the code base.  The result
is
 shorter and safer code.  For now only consider calls where source and
destination have the same type, or in other words: easy cases.

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>typofix: assorted typofixes in comments, documentation and messages</title>
<updated>2016-05-06T20:16:37Z</updated>
<author>
<name>Li Peng</name>
<email>lip@dtdream.com</email>
</author>
<published>2016-05-06T12:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=832c0e5e63a0f61c3788847d4a7abb82d9e86ef4'/>
<id>urn:sha1:832c0e5e63a0f61c3788847d4a7abb82d9e86ef4</id>
<content type='text'>
Many instances of duplicate words (e.g. "the the path") and
a few typoes are fixed, originally in multiple patches.

    wildmatch: fix duplicate words of "the"
    t: fix duplicate words of "output"
    transport-helper: fix duplicate words of "read"
    Git.pm: fix duplicate words of "return"
    path: fix duplicate words of "look"
    pack-protocol.txt: fix duplicate words of "the"
    precompose-utf8: fix typo of "sequences"
    split-index: fix typo
    worktree.c: fix typo
    remote-ext: fix typo
    utf8: fix duplicate words of "the"
    git-cvsserver: fix duplicate words

Signed-off-by: Li Peng &lt;lip@dtdream.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ewah: add convenient wrapper ewah_serialize_strbuf()</title>
<updated>2015-03-12T20:45:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-03-08T10:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be0d9d532326a81d761913e3ec9e2e7c62eeca7b'/>
<id>urn:sha1:be0d9d532326a81d761913e3ec9e2e7c62eeca7b</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>update-index: new options to enable/disable split index mode</title>
<updated>2014-06-13T18:49:41Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-06-13T12:19:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c18b80a0e86c4529146e3947454159627f1419a7'/>
<id>urn:sha1:c18b80a0e86c4529146e3947454159627f1419a7</id>
<content type='text'>
If you have a large work tree but only make changes in a subset, then
$GIT_DIR/index's size should be stable after a while. If you change
branches that touch something else, $GIT_DIR/index's size may grow
large that it becomes as slow as the unified index. Do --split-index
again occasionally to force all changes back to the shared index and
keep $GIT_DIR/index small.

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>split-index: strip pathname of on-disk replaced entries</title>
<updated>2014-06-13T18:49:41Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-06-13T12:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3c96fb158f05152336f167076f5d81d23c3a5e5'/>
<id>urn:sha1:b3c96fb158f05152336f167076f5d81d23c3a5e5</id>
<content type='text'>
We know the positions of replaced entries via the replace bitmap in
"link" extension, so the "name" path does not have to be stored (it's
still in the shared index). With this, we also have a way to
distinguish additions vs replacements at load time and can catch
broken "link" extensions.

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>split-index: do not invalidate cache-tree at read time</title>
<updated>2014-06-13T18:49:41Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-06-13T12:19:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce7c614bceedf0c0169dd5b02cae3e33ee45acdd'/>
<id>urn:sha1:ce7c614bceedf0c0169dd5b02cae3e33ee45acdd</id>
<content type='text'>
We are sure that after merge_base_index() is done. cache-tree can
still be used with the final index. So don't destroy cache tree.

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>split-index: the reading part</title>
<updated>2014-06-13T18:49:40Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-06-13T12:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76b07b37a3fff15ce4852bd070a610b651c42e77'/>
<id>urn:sha1:76b07b37a3fff15ce4852bd070a610b651c42e77</id>
<content type='text'>
CE_REMOVE'd entries are removed here because only parts of the code
base (unpack_trees in fact) test this bit when they look for the
presence of an entry. Leaving them may confuse the code ignores this
bit and expects to see a real entry.

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>split-index: the writing part</title>
<updated>2014-06-13T18:49:40Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-06-13T12:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96a1d8d34c16be8fc5acd7ceb4d34573d8e2a76b'/>
<id>urn:sha1:96a1d8d34c16be8fc5acd7ceb4d34573d8e2a76b</id>
<content type='text'>
prepare_to_write_split_index() does the major work, classifying
deleted, updated and added entries. write_link_extension() then just
writes it down.

An observation is, deleting an entry, then adding it back is recorded
as "entry X is deleted, entry X is added", not "entry X is replaced".
This is simpler, with small overhead: a replaced entry is stored
without its path, a new entry is store with its path.

A note about unpack_trees() and the deduplication code inside
prepare_to_write_split_index(). Usually tracking updated/removed
entries via read-cache API is enough. unpack_trees() manipulates the
index in a different way: it throws the entire source index out,
builds up a new one, copying/duplicating entries (using dup_entry)
from the source index over if necessary, then returns the new index.

A naive solution would be marking the entire source index "deleted"
and add their duplicates as new. That could bring $GIT_DIR/index back
to the original size. So we try harder and memcmp() between the
original and the duplicate to see if it needs updating.

We could avoid memcmp() too, by avoiding duplicating the original
entry in dup_entry(). The performance gain this way is within noise
level and it complicates unpack-trees.c. So memcmp() is the preferred
way to deal with deduplication.

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>
</feed>
