<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ref-filter.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-30T05:04:07Z</updated>
<entry>
<title>Merge branch 'js/use-bug-macro'</title>
<updated>2018-05-30T05:04:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-30T05:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50f08db5941755b69012378bfc86f6b8ee98edf4'/>
<id>urn:sha1:50f08db5941755b69012378bfc86f6b8ee98edf4</id>
<content type='text'>
Developer support update, by using BUG() macro instead of die() to
mark codepaths that should not happen more clearly.

* js/use-bug-macro:
  BUG_exit_code: fix sparse "symbol not declared" warning
  Convert remaining die*(BUG) messages
  Replace all die("BUG: ...") calls by BUG() ones
  run-command: use BUG() to report bugs, not die()
  test-tool: help verifying BUG() code paths
</content>
</entry>
<entry>
<title>Merge branch 'ds/lazy-load-trees'</title>
<updated>2018-05-23T05:38:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c89b6e136e421f1e9108b3c5bc050b19b0243844'/>
<id>urn:sha1:c89b6e136e421f1e9108b3c5bc050b19b0243844</id>
<content type='text'>
The code has been taught to use the duplicated information stored
in the commit-graph file to learn the tree object name for a commit
to avoid opening and parsing the commit object when it makes sense
to do so.

* ds/lazy-load-trees:
  coccinelle: avoid wrong transformation suggestions from commit.cocci
  commit-graph: lazy-load trees for commits
  treewide: replace maybe_tree with accessor methods
  commit: create get_commit_tree() method
  treewide: rename tree to maybe_tree
</content>
</entry>
<entry>
<title>Merge branch 'ot/libify-get-ref-atom-value'</title>
<updated>2018-05-08T06:59:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7da73ac8b953afd788e096b5b216e3bd9845659'/>
<id>urn:sha1:b7da73ac8b953afd788e096b5b216e3bd9845659</id>
<content type='text'>
Code restructuring, in preparation for further work.

* ot/libify-get-ref-atom-value:
  ref-filter: libify get_ref_atom_value()
  ref-filter: add return value to parsers
  ref-filter: change parsing function error handling
  ref-filter: add return value &amp;&amp; strbuf to handlers
  ref-filter: start adding strbufs with errors
  ref-filter: add shortcut to work with strbufs
</content>
</entry>
<entry>
<title>Replace all die("BUG: ...") calls by BUG() ones</title>
<updated>2018-05-06T10:06:13Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-05-02T09:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=033abf97fcbc247eabf915780181d947cfb66205'/>
<id>urn:sha1:033abf97fcbc247eabf915780181d947cfb66205</id>
<content type='text'>
In d8193743e08 (usage.c: add BUG() function, 2017-05-12), a new macro
was introduced to use for reporting bugs instead of die(). It was then
subsequently used to convert one single caller in 588a538ae55
(setup_git_env: convert die("BUG") to BUG(), 2017-05-12).

The cover letter of the patch series containing this patch
(cf 20170513032414.mfrwabt4hovujde2@sigill.intra.peff.net) is not
terribly clear why only one call site was converted, or what the plan
is for other, similar calls to die() to report bugs.

Let's just convert all remaining ones in one fell swoop.

This trick was performed by this invocation:

	sed -i 's/die("BUG: /BUG("/g' $(git grep -l 'die("BUG' \*.c)

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/ref-array-push'</title>
<updated>2018-04-25T04:28:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-25T04:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3d6c48c5fbec88e96799c5463f7fdddaa19e9d5'/>
<id>urn:sha1:b3d6c48c5fbec88e96799c5463f7fdddaa19e9d5</id>
<content type='text'>
API clean-up aournd ref-filter code.

* jk/ref-array-push:
  ref-filter: factor ref_array pushing into its own function
  ref-filter: make ref_array_item allocation more consistent
  ref-filter: use "struct object_id" consistently
</content>
</entry>
<entry>
<title>Merge branch 'ks/branch-list-detached-rebase-i'</title>
<updated>2018-04-25T04:28:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-25T04:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4cbaa6b47fbdcf68bd06d4a6ebf550153fb18636'/>
<id>urn:sha1:4cbaa6b47fbdcf68bd06d4a6ebf550153fb18636</id>
<content type='text'>
"git branch --list" during an interrupted "rebase -i" now lets
users distinguish the case where a detached HEAD is being rebased
and a normal branch is being rebased.

* ks/branch-list-detached-rebase-i:
  t3200: verify "branch --list" sanity when rebasing from detached HEAD
  branch --list: print useful info whilst interactive rebasing a detached HEAD
</content>
</entry>
<entry>
<title>treewide: replace maybe_tree with accessor methods</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e27bd7731d47b374c1c14b53af07b3bfa39fcac'/>
<id>urn:sha1:2e27bd7731d47b374c1c14b53af07b3bfa39fcac</id>
<content type='text'>
In anticipation of making trees load lazily, create a Coccinelle
script (contrib/coccinelle/commit.cocci) to ensure that all
references to the 'maybe_tree' member of struct commit are either
mutations or accesses through get_commit_tree() or
get_commit_tree_oid().

Apply the Coccinelle script to create the rest of the patch.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: rename tree to maybe_tree</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=891435d55da80ca3654b19834481205be6bdfe33'/>
<id>urn:sha1:891435d55da80ca3654b19834481205be6bdfe33</id>
<content type='text'>
Using the commit-graph file to walk commit history removes the large
cost of parsing commits during the walk. This exposes a performance
issue: lookup_tree() takes a large portion of the computation time,
even when Git never uses those trees.

In anticipation of lazy-loading these trees, rename the 'tree' member
of struct commit to 'maybe_tree'. This serves two purposes: it hints
at the future role of possibly being NULL even if the commit has a
valid tree, and it allows for unambiguous transformation from simple
member access (i.e. commit-&gt;maybe_tree) to method access.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref-filter: factor ref_array pushing into its own function</title>
<updated>2018-04-08T21:14:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-04-06T18:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=427cbc9dbfeb7c96bb1d5d9ace722353e2a5438e'/>
<id>urn:sha1:427cbc9dbfeb7c96bb1d5d9ace722353e2a5438e</id>
<content type='text'>
In preparation for callers constructing their own ref_array
structs, let's move our own internal push operation into its
own function.

While we're at it, we can replace REALLOC_ARRAY() with
ALLOC_GROW(), which should give the growth operation
amortized linear complexity (as opposed to growing by one,
which is potentially quadratic, though in-place realloc
growth often makes this faster in practice).

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>ref-filter: make ref_array_item allocation more consistent</title>
<updated>2018-04-08T21:14:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-04-06T18:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ffaa00f453978bffc4ff0f8a45ea0a52549e7cd'/>
<id>urn:sha1:0ffaa00f453978bffc4ff0f8a45ea0a52549e7cd</id>
<content type='text'>
We have a helper function to allocate ref_array_item
structs, but it only takes a subset of the possible fields
in the struct as initializers. We could have it accept an
argument for _every_ field, but that becomes a pain for the
fields which some callers don't want to set initially.

Instead, let's be explicit that it takes only the minimum
required to create the ref, and that callers should then
fill in the rest themselves.

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