<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-merges.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-10-09T19:47:29Z</updated>
<entry>
<title>diff-merges: introduce '--dd' option</title>
<updated>2023-10-09T19:47:29Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2023-10-09T16:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8e5cb065802e96c5aa5dd25936d9780c5734182'/>
<id>urn:sha1:c8e5cb065802e96c5aa5dd25936d9780c5734182</id>
<content type='text'>
This option provides a shortcut to request diff with respect to first
parent for any kind of commit, universally. It's implemented as pure
synonym for "--diff-merges=first-parent --patch".

Gives user quick and universal way to see what changes, exactly, were
brought to a branch by merges as well as by regular commits.

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>object.h: stop depending on cache.h; make cache.h depend on object.h</title>
<updated>2023-02-24T01:25:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a64215b6cd5e67939187475c5b248dc5d13e3d60'/>
<id>urn:sha1:a64215b6cd5e67939187475c5b248dc5d13e3d60</id>
<content type='text'>
Things should be able to depend on object.h without pulling in all of
cache.h.  Move an enum to allow this.

Note that a couple files previously depended on things brought in
through cache.h indirectly (revision.h -&gt; commit.h -&gt; object.h -&gt;
cache.h).  As such, this change requires making existing dependencies
more explicit in half a dozen files.  The inclusion of strbuf.h in
some headers if of particular note: these headers directly embedded a
strbuf in some new structs, meaning they should have been including
strbuf.h all along but were indirectly getting the necessary
definitions.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: ensure one of the appropriate headers is sourced first</title>
<updated>2023-02-24T01:25:28Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8bff5ca030d314d613e1ab58f07b27914d6dfd33'/>
<id>urn:sha1:8bff5ca030d314d613e1ab58f07b27914d6dfd33</id>
<content type='text'>
We had several C files ignoring the rule to include one of the
appropriate headers first; fix that.

While at it, the rule in Documentation/CodingGuidelines about which
header to include has also fallen out of sync, so update the wording to
mention other allowed headers.

Unfortunately, C files in reftable/ don't actually follow the previous
or updated rule.  If you follow the #include chain in its C files,
reftable/system.h _tends_ to be first (i.e. record.c first includes
record.h, which first includes basics.h, which first includees
system.h), but not always (e.g. publicbasics.c includes another header
first that does not include system.h).  However, I'm going to punt on
making actual changes to the C files in reftable/ since I do not want to
risk bringing it out-of-sync with any version being used externally.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: cleanup set_diff_merges()</title>
<updated>2022-09-16T16:21:43Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2022-09-14T19:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=563005ecbf552b1be5f632a049ed6cd4fd6aa4e2'/>
<id>urn:sha1:563005ecbf552b1be5f632a049ed6cd4fd6aa4e2</id>
<content type='text'>
Get rid of special-casing of 'suppress' in set_diff_merges(). Instead
set 'merges_need_diff' flag correctly in every option handling
function.

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: cleanup func_by_opt()</title>
<updated>2022-09-16T16:21:40Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2022-09-14T19:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c7c4f7608afe811ea5c2095d93020639707a8733'/>
<id>urn:sha1:c7c4f7608afe811ea5c2095d93020639707a8733</id>
<content type='text'>
Get rid of unneeded "else" statements in func_by_opt().

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>Merge branch 'ja/i18n-common-messages'</title>
<updated>2022-02-25T23:47:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-25T23:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d21d5ddfe675f9dbcdbb94ab01776115a2d1fdde'/>
<id>urn:sha1:d21d5ddfe675f9dbcdbb94ab01776115a2d1fdde</id>
<content type='text'>
Unify more messages to help l10n.

* ja/i18n-common-messages:
  i18n: fix some misformated placeholders in command synopsis
  i18n: remove from i18n strings that do not hold translatable parts
  i18n: factorize "invalid value" messages
  i18n: factorize more 'incompatible options' messages
</content>
</entry>
<entry>
<title>i18n: factorize "invalid value" messages</title>
<updated>2022-02-04T21:58:28Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2022-01-31T22:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a8aea857e4225a9d35a531869fd47777f3063d6'/>
<id>urn:sha1:1a8aea857e4225a9d35a531869fd47777f3063d6</id>
<content type='text'>
Use the same message when an invalid value is passed to a command line
option or a configuration variable.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-merges: avoid history simplifications when diffing merges</title>
<updated>2022-02-02T18:02:28Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2022-02-02T02:37:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0dec322d31db3920872f43bdd2a7ddd282a5be67'/>
<id>urn:sha1:0dec322d31db3920872f43bdd2a7ddd282a5be67</id>
<content type='text'>
Doing diffs for merges are special; they should typically avoid history
simplification.  For example, with

    git log --diff-merges=first-parent -- path

the default history simplification would remove merge commits from
consideration if the file "path" matched the second parent.  That is
counter to what the user wants when looking for first-parent diffs.
Similar comments can be made for --diff-merges=separate (which diffs
against both parents) and --diff-merges=remerge (which diffs against a
remerge of the merge commit).

However, history simplification still makes sense if not doing diffing
merges, and it also makes sense for the combined and dense-combined
forms of diffing merges (because both of those are defined to only show
a diff when the merge result at the relevant paths differs from *both*
parents).

So, for separate, first-parent, and remerge styles of diff-merges, turn
off history simplification.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>show, log: provide a --remerge-diff capability</title>
<updated>2022-02-02T18:02:27Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2022-02-02T02:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db757e8b8d5527c195c461a04ec35d141ddea48e'/>
<id>urn:sha1:db757e8b8d5527c195c461a04ec35d141ddea48e</id>
<content type='text'>
When this option is specified, we remerge all (two parent) merge commits
and diff the actual merge commit to the automatically created version,
in order to show how users removed conflict markers, resolved the
different conflict versions, and potentially added new changes outside
of conflict regions in order to resolve semantic merge problems (or,
possibly, just to hide other random changes).

This capability works by creating a temporary object directory and
marking it as the primary object store.  This makes it so that any blobs
or trees created during the automatic merge are easily removable
afterwards by just deleting all objects from the temporary object
directory.

There are a few ways that this implementation is suboptimal:
  * `log --remerge-diff` becomes slow, because the temporary object
    directory can fill with many loose objects while running
  * the log output can be muddied with misplaced "warning: cannot merge
    binary files" messages, since ll-merge.c unconditionally writes those
    messages to stderr while running instead of allowing callers to
    manage them.
  * important conflict and warning messages are simply dropped; thus for
    conflicts like modify/delete or rename/rename or file/directory which
    are not representable with content conflict markers, there may be no
    way for a user of --remerge-diff to know that there had been a
    conflict which was resolved (and which possibly motivated other
    changes in the merge commit).
  * when fixing the previous issue, note that some unimportant conflict
    and warning messages might start being included.  We should instead
    make sure these remain dropped.
Subsequent commits will address these issues.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-index: restore -c/--cc options handling</title>
<updated>2021-09-07T18:11:35Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-09-01T16:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5acffd34738f9718caf2a5811bddbf2f40e968a0'/>
<id>urn:sha1:5acffd34738f9718caf2a5811bddbf2f40e968a0</id>
<content type='text'>
This fixes 19b2517f (diff-merges: move specific diff-index "-m"
handling to diff-index, 2021-05-21).

That commit disabled handling of all diff for merges options in
diff-index on an assumption that they are unused. However, it later
appeared that -c and --cc, even though undocumented and not being
covered by tests, happen to have had particular effect on diff-index
output.

Restore original -c/--cc options handling by diff-index.

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