<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-merges.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-04-17T06:38:35Z</updated>
<entry>
<title>diff-merges: introduce log.diffMerges config variable</title>
<updated>2021-04-17T06:38:35Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-04-13T11:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17c13e60fd799336b28d320dcba06fe1ef06e01d'/>
<id>urn:sha1:17c13e60fd799336b28d320dcba06fe1ef06e01d</id>
<content type='text'>
New log.diffMerges configuration variable sets the format that
--diff-merges=on will be using. The default is "separate".

t4013: add the following tests for log.diffMerges config:

* Test that wrong values are denied.

* Test that the value of log.diffMerges properly affects both
--diff-merges=on and -m.

t9902: fix completion tests for log.d* to match log.diffMerges.

Added documentation for log.diffMerges.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: adapt -m to enable default diff format</title>
<updated>2021-04-17T06:38:35Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-04-13T11:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=38fc4dbbc2f110192752a3b2c99abb745f0494bf'/>
<id>urn:sha1:38fc4dbbc2f110192752a3b2c99abb745f0494bf</id>
<content type='text'>
Let -m option (and --diff-merges=m) enable the default format instead
of "separate", to be able to tune it with log.diffMerges option.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: refactor set_diff_merges()</title>
<updated>2021-04-17T06:38:35Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-04-13T11:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26a0f58da84a7da11f9175144c9a926e7b376349'/>
<id>urn:sha1:26a0f58da84a7da11f9175144c9a926e7b376349</id>
<content type='text'>
Split set_diff_merges() into separate parsing and execution functions,
the former to be reused for parsing of configuration values later in
the patch series.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: introduce --diff-merges=on</title>
<updated>2021-04-17T06:38:35Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-04-13T11:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4320815eb9a002b4ee64f70dda9b1c1e019f4894'/>
<id>urn:sha1:4320815eb9a002b4ee64f70dda9b1c1e019f4894</id>
<content type='text'>
Introduce the notion of default diff format for merges, and the option
"on" to select it. The default format is "separate" and can't yet
be changed, so effectively "on" is just a synonym for "separate"
for now. Add corresponding test to t4013.

This is in preparation for introducing log.diffMerges configuration
option that will let --diff-merges=on to be configured to any
supported format.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: add '--diff-merges=1' as synonym for 'first-parent'</title>
<updated>2020-12-21T21:47:32Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=388091fe4d9e06475f491c195e84e1996aad3f42'/>
<id>urn:sha1:388091fe4d9e06475f491c195e84e1996aad3f42</id>
<content type='text'>
As we now have --diff-merges={m|c|cc}, add --diff-merges=1 as synonym
for --diff-merges=first-parent, to have shorter mnemonics for it as
well.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: add old mnemonic counterparts to --diff-merges</title>
<updated>2020-12-21T21:47:32Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5071c7531692f53cdfec43542f1cbaee573fd2be'/>
<id>urn:sha1:5071c7531692f53cdfec43542f1cbaee573fd2be</id>
<content type='text'>
This adds --diff-merges={m|c|cc} values that match mnemonics of old
options, for those who are used to them.

Note that, say, --diff-meres=cc behaves differently than --cc, as the
latter implies -p and therefore enables diffs for all the commits,
while the former enables output of diffs for merge commits only.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: let new options enable diff without -p</title>
<updated>2020-12-21T21:47:32Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6d19ecc6b7715b50b0dced7e3d2923a8797df64'/>
<id>urn:sha1:a6d19ecc6b7715b50b0dced7e3d2923a8797df64</id>
<content type='text'>
New options don't have any visible effect unless -p is either given or
implied, as unlike -c/-cc we don't imply -p with --diff-merges. To fix
this, this patch adds new functionality by letting new options enable
output of diffs for merge commits only.

Add 'merges_need_diff' field and set it whenever diff output for merges is
enabled by any of the new options.

Extend diff output logic accordingly, to output diffs for merges when
'merges_need_diff' is set even when no -p has been provided.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: do not imply -p for new options</title>
<updated>2020-12-21T21:47:32Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5733b20f41ac0fecdacdf34a11acef2d03fac829'/>
<id>urn:sha1:5733b20f41ac0fecdacdf34a11acef2d03fac829</id>
<content type='text'>
Add 'combined_imply_patch' field and set it only for old --cc/-c
options, then imply -p if this flag is set instead of implying -p
whenever 'combined_merge' flag is set.

We don't want new --diff-merge options to imply -p, to make it
possible to enable output of diffs for merges independently from
non-merge commits. At the same time we want to preserve behavior of
old --c/-c/-m options and their interactions with --first-parent, to
stay backward-compatible.

This patch is first step in this direction: it separates old "--cc/-c
imply -p" logic from the rest of the options.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: implement new values for --diff-merges</title>
<updated>2020-12-21T21:47:32Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c0ba528bc3c61f4582bf68d3f0cc2a72f5f3792'/>
<id>urn:sha1:8c0ba528bc3c61f4582bf68d3f0cc2a72f5f3792</id>
<content type='text'>
We first implement new options as exact synonyms for their original
counterparts, to get all the infrastructure right, and keep functional
improvements for later commits.

The following values are implemented:

--diff-merges=	        old equivalent
first|first-parent    = --first-parent (only format implications)
sep|separate          = -m
comb|combined         = -c
dense| dense-combined = --cc

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: make -m/-c/--cc explicitly mutually exclusive</title>
<updated>2020-12-21T21:47:31Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-12-21T15:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=255a4dacc59f4f4f62cc61743f40a078b4b38647'/>
<id>urn:sha1:255a4dacc59f4f4f62cc61743f40a078b4b38647</id>
<content type='text'>
-c/--cc got precedence over -m only because of external logic where
corresponding flags are checked before that for -m. This is too
error-prone, so add code that explicitly makes these 3 options
mutually exclusive, so that the last option specified on the
command-line gets precedence.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
