<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.c, branch v2.19.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.19.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.19.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2018-08-20T18:33:53Z</updated>
<entry>
<title>Merge branch 'js/range-diff'</title>
<updated>2018-08-20T18:33:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-20T18:33:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=81eab6871e03869a8e47799c10ec1e1cb95ca34a'/>
<id>urn:sha1:81eab6871e03869a8e47799c10ec1e1cb95ca34a</id>
<content type='text'>
"git tbdiff" that lets us compare individual patches in two
iterations of a topic has been rewritten and made into a built-in
command.

* js/range-diff: (21 commits)
  range-diff: use dim/bold cues to improve dual color mode
  range-diff: make --dual-color the default mode
  range-diff: left-pad patch numbers
  completion: support `git range-diff`
  range-diff: populate the man page
  range-diff --dual-color: skip white-space warnings
  range-diff: offer to dual-color the diffs
  diff: add an internal option to dual-color diffs of diffs
  color: add the meta color GIT_COLOR_REVERSE
  range-diff: use color for the commit pairs
  range-diff: add tests
  range-diff: do not show "function names" in hunk headers
  range-diff: adjust the output of the commit pairs
  range-diff: suppress the diff headers
  range-diff: indent the diffs just like tbdiff
  range-diff: right-trim commit messages
  range-diff: also show the diff between patches
  range-diff: improve the order of the shown commits
  range-diff: first rudimentary implementation
  Introduce `range-diff` to compare iterations of a topic branch
  ...
</content>
</entry>
<entry>
<title>Merge branch 'nd/no-the-index'</title>
<updated>2018-08-20T18:33:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-20T18:33:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=dc0f6f9e1d56059fff1e8c539a1c0e4bc5658714'/>
<id>urn:sha1:dc0f6f9e1d56059fff1e8c539a1c0e4bc5658714</id>
<content type='text'>
The more library-ish parts of the codebase learned to work on the
in-core index-state instance that is passed in by their callers,
instead of always working on the singleton "the_index" instance.

* nd/no-the-index: (24 commits)
  blame.c: remove implicit dependency on the_index
  apply.c: remove implicit dependency on the_index
  apply.c: make init_apply_state() take a struct repository
  apply.c: pass struct apply_state to more functions
  resolve-undo.c: use the right index instead of the_index
  archive-*.c: use the right repository
  archive.c: avoid access to the_index
  grep: use the right index instead of the_index
  attr: remove index from git_attr_set_direction()
  entry.c: use the right index instead of the_index
  submodule.c: use the right index instead of the_index
  pathspec.c: use the right index instead of the_index
  unpack-trees: avoid the_index in verify_absent()
  unpack-trees: convert clear_ce_flags* to avoid the_index
  unpack-trees: don't shadow global var the_index
  unpack-trees: add a note about path invalidation
  unpack-trees: remove 'extern' on function declaration
  ls-files: correct index argument to get_convert_attr_ascii()
  preload-index.c: use the right index instead of the_index
  dir.c: remove an implicit dependency on the_index in pathspec code
  ...
</content>
</entry>
<entry>
<title>Merge branch 'nd/i18n'</title>
<updated>2018-08-15T22:08:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-15T22:08:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4bea8485e395769951c6b9eddfba1081ea7ef47f'/>
<id>urn:sha1:4bea8485e395769951c6b9eddfba1081ea7ef47f</id>
<content type='text'>
Many more strings are prepared for l10n.

* nd/i18n: (23 commits)
  transport-helper.c: mark more strings for translation
  transport.c: mark more strings for translation
  sha1-file.c: mark more strings for translation
  sequencer.c: mark more strings for translation
  replace-object.c: mark more strings for translation
  refspec.c: mark more strings for translation
  refs.c: mark more strings for translation
  pkt-line.c: mark more strings for translation
  object.c: mark more strings for translation
  exec-cmd.c: mark more strings for translation
  environment.c: mark more strings for translation
  dir.c: mark more strings for translation
  convert.c: mark more strings for translation
  connect.c: mark more strings for translation
  config.c: mark more strings for translation
  commit-graph.c: mark more strings for translation
  builtin/replace.c: mark more strings for translation
  builtin/pack-objects.c: mark more strings for translation
  builtin/grep.c: mark strings for translation
  builtin/config.c: mark more strings for translation
  ...
</content>
</entry>
<entry>
<title>Merge branch 'es/diff-color-moved-fix'</title>
<updated>2018-08-15T22:08:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-15T22:08:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=706b0b5e8d683b06e99bdfb2349228b360e4cf03'/>
<id>urn:sha1:706b0b5e8d683b06e99bdfb2349228b360e4cf03</id>
<content type='text'>
One of the "diff --color-moved" mode "dimmed_zebra" that was named
in an unusual way has been deprecated and replaced by
"dimmed-zebra".

* es/diff-color-moved-fix:
  diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"
</content>
</entry>
<entry>
<title>convert.c: remove an implicit dependency on the_index</title>
<updated>2018-08-13T21:14:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-13T16:14:21Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7f944e264ebe2fcf9a2c228a9fc9463ab3274d39'/>
<id>urn:sha1:7f944e264ebe2fcf9a2c228a9fc9463ab3274d39</id>
<content type='text'>
Make the convert API take an index_state instead of assuming the_index
in convert.c. All external call sites are converted blindly to keep
the patch simple and retain current behavior. Individual call sites
may receive further updates to use the right index instead of
the_index.

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>diff.c: move read_index() code back to the caller</title>
<updated>2018-08-13T21:14:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-13T16:14:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ff7fe37b0530c0ddb5a88fe41b963b68b3f66127'/>
<id>urn:sha1:ff7fe37b0530c0ddb5a88fe41b963b68b3f66127</id>
<content type='text'>
This code is only needed for diff-tree (since f0c6b2a2fd ([PATCH]
Optimize diff-tree -[CM] --stdin - 2005-05-27)). Let the caller do the
preparation instead and avoid read_index() in diff.c code.

read_index() should be avoided (in addition to the_index) because it
uses get_index_file() underneath to get the path $GIT_DIR/index. This
effectively pulls the_repository in and may become the only reason to
pull a 'struct repository *' in diff.c. Let's keep the dependencies as
few as possible and kick it back to diff-tree.c

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>range-diff: use dim/bold cues to improve dual color mode</title>
<updated>2018-08-13T17:44:52Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a7be92acd96007bcb4c1fd4e8602eeb5115312c2'/>
<id>urn:sha1:a7be92acd96007bcb4c1fd4e8602eeb5115312c2</id>
<content type='text'>
It *is* a confusing thing to look at a diff of diffs. All too easy is it
to mix up whether the -/+ markers refer to the "inner" or the "outer"
diff, i.e. whether a `+` indicates that a line was added by either the
old or the new diff (or both), or whether the new diff does something
different than the old diff.

To make things easier to process for normal developers, we introduced
the dual color mode which colors the lines according to the commit diff,
i.e. lines that are added by a commit (whether old, new, or both) are
colored in green. In non-dual color mode, the lines would be colored
according to the outer diff: if the old commit added a line, it would be
colored red (because that line addition is only present in the first
commit range that was specified on the command-line, i.e. the "old"
commit, but not in the second commit range, i.e. the "new" commit).

However, this dual color mode is still not making things clear enough,
as we are looking at two levels of diffs, and we still only pick a color
according to *one* of them (the outer diff marker is colored
differently, of course, but in particular with deep indentation, it is
easy to lose track of that outer diff marker's background color).

Therefore, let's add another dimension to the mix. Still use
green/red/normal according to the commit diffs, but now also dim the
lines that were only in the old commit, and use bold face for the lines
that are only in the new commit.

That way, it is much easier not to lose track of, say, when we are
looking at a line that was added in the previous iteration of a patch
series but the new iteration adds a slightly different version: the
obsolete change will be dimmed, the current version of the patch will be
bold.

At least this developer has a much easier time reading the range-diffs
that way.

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>range-diff --dual-color: skip white-space warnings</title>
<updated>2018-08-13T17:44:51Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:24Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0b91faa010e438c4e0a58706573f3777da86ecde'/>
<id>urn:sha1:0b91faa010e438c4e0a58706573f3777da86ecde</id>
<content type='text'>
When displaying a diff of diffs, it is possible that there is an outer
`+` before a context line. That happens when the context changed between
old and new commit. When that context line starts with a tab (after the
space that marks it as context line), our diff machinery spits out a
white-space error (space before tab), but in this case, that is
incorrect.

Rather than adding a specific whitespace flag that specifically ignores
the first space in the output (and might miss other problems with the
white-space warnings), let's just skip handling white-space errors in
dual color mode to begin with.

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>diff: add an internal option to dual-color diffs of diffs</title>
<updated>2018-08-13T17:44:51Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f7c3b4e2d8c16890c40c7e10e16cabb910f6b3ae'/>
<id>urn:sha1:f7c3b4e2d8c16890c40c7e10e16cabb910f6b3ae</id>
<content type='text'>
When diffing diffs, it can be quite daunting to figure out what the heck
is going on, as there are nested +/- signs.

Let's make this easier by adding a flag in diff_options that allows
color-coding the outer diff sign with inverted colors, so that the
preimage and postimage is colored like the diff it is.

Of course, this really only makes sense when the preimage and postimage
*are* diffs. So let's not expose this flag via a command-line option for
now.

This is a feature that was invented by git-tbdiff, and it will be used
by `git range-diff` in the next commit, by offering it via a new option:
`--dual-color`.

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>range-diff: suppress the diff headers</title>
<updated>2018-08-13T17:44:51Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-08-13T11:33:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1cdde296a5d3b0fd17a3fcd7a0869550b064fdce'/>
<id>urn:sha1:1cdde296a5d3b0fd17a3fcd7a0869550b064fdce</id>
<content type='text'>
When showing the diff between corresponding patches of the two branch
versions, we have to make up a fake filename to run the diff machinery.

That filename does not carry any meaningful information, hence tbdiff
suppresses it. So we should, too.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
