<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.c, branch v2.12.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.12.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.12.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-03-21T22:03:26Z</updated>
<entry>
<title>Merge branch 'jc/diff-populate-filespec-size-only-fix' into maint</title>
<updated>2017-03-21T22:03:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-21T22:03:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cc8e385a7cb1bbf6d5a66ee7a0610608a122b3c0'/>
<id>urn:sha1:cc8e385a7cb1bbf6d5a66ee7a0610608a122b3c0</id>
<content type='text'>
"git diff --quiet" relies on the size field in diff_filespec to be
correctly populated, but diff_populate_filespec() helper function
made an incorrect short-cut when asked only to populate the size
field for paths that need to go through convert_to_git() (e.g. CRLF
conversion).

* jc/diff-populate-filespec-size-only-fix:
  diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()
</content>
</entry>
<entry>
<title>diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()</title>
<updated>2017-03-02T18:48:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-01T17:04:44Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=12426e114b252d130d83c3f098c4ceae3cf217e3'/>
<id>urn:sha1:12426e114b252d130d83c3f098c4ceae3cf217e3</id>
<content type='text'>
Callers of diff_populate_filespec() can choose to ask only for the
size of the blob without grabbing the blob data, and the function,
after running lstat() when the filespec points at a working tree
file, returns by copying the value in size field of the stat
structure into the size field of the filespec when this is the case.

However, this short-cut cannot be taken if the contents from the
path needs to go through convert_to_git(), whose resulting real blob
data may be different from what is in the working tree file.

As "git diff --quiet" compares the .size fields of filespec
structures to skip content comparison, this bug manifests as a
false "there are differences" for a file that needs eol conversion,
for example.

Reported-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Helped-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/swap'</title>
<updated>2017-02-15T20:54:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-15T20:54:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cbf1860d73b782e7924e63361df485b31225a26a'/>
<id>urn:sha1:cbf1860d73b782e7924e63361df485b31225a26a</id>
<content type='text'>
Code clean-up.

* rs/swap:
  graph: use SWAP macro
  diff: use SWAP macro
  use SWAP macro
  apply: use SWAP macro
  add SWAP macro
</content>
</entry>
<entry>
<title>Merge branch 'jk/log-graph-name-only'</title>
<updated>2017-02-10T20:52:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-10T20:52:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e53c7f8731f7fa66864397d3d1ec1ad7c035c23a'/>
<id>urn:sha1:e53c7f8731f7fa66864397d3d1ec1ad7c035c23a</id>
<content type='text'>
"git log --graph" did not work well with "--name-only", even though
other forms of "diff" output were handled correctly.

* jk/log-graph-name-only:
  diff: print line prefix for --name-only output
</content>
</entry>
<entry>
<title>diff: print line prefix for --name-only output</title>
<updated>2017-02-08T21:39:57Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-02-08T20:31:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f5022b5fedb405c6bbb0b3e7c5a3a7f507279ef5'/>
<id>urn:sha1:f5022b5fedb405c6bbb0b3e7c5a3a7f507279ef5</id>
<content type='text'>
If you run "git log --graph --name-only", the pathnames are
not indented to go along with their matching commits (unlike
all of the other diff formats). We need to output the line
prefix for each item before writing it.

The tests cover both --name-status and --name-only. The
former actually gets this right already, because it builds
on the --raw format functions. It's only --name-only which
uses its own code (and this fix mirrors the code in
diff_flush_raw()).

Note that the tests don't follow our usual style of setting
up the "expect" output inside the test block. This matches
the surrounding style, but more importantly it is easier to
read: we don't have to worry about embedded single-quotes,
and the leading indentation is more obvious.

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>use oid_to_hex_r() for converting struct object_id hashes to hex strings</title>
<updated>2017-01-30T22:23:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-28T22:03:03Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2490574d15cab6e8d955dc4132cf9e7e83fc1172'/>
<id>urn:sha1:2490574d15cab6e8d955dc4132cf9e7e83fc1172</id>
<content type='text'>
Patch generated by Coccinelle and contrib/coccinelle/object_id.cocci.

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>diff: use SWAP macro</title>
<updated>2017-01-30T22:23:00Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-28T21:41:47Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=402bf8e19832142de97d84d37c51262d91e5f2db'/>
<id>urn:sha1:402bf8e19832142de97d84d37c51262d91e5f2db</id>
<content type='text'>
Use the macro SWAP to exchange the value of pairs of variables instead
of swapping them manually with the help of a temporary variable.  The
resulting code is shorter and easier to read.

The two cases were not transformed by the semantic patch swap.cocci
because it's extra careful and handles only cases where the types of all
variables are the same -- and here we swap two ints and use an unsigned
temporary variable for that.  Nevertheless the conversion is safe, as
the value range is preserved with and without the patch.

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>use SWAP macro</title>
<updated>2017-01-30T22:17:00Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-28T21:40:58Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=35d803bc9a0d21c36b1381f6e42455beeb73b715'/>
<id>urn:sha1:35d803bc9a0d21c36b1381f6e42455beeb73b715</id>
<content type='text'>
Apply the semantic patch swap.cocci to convert hand-rolled swaps to use
the macro SWAP.  The resulting code is shorter and easier to read, the
object code is effectively unchanged.

The patch for object.c had to be hand-edited in order to preserve the
comment before the change; Coccinelle tried to eat it for some reason.

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>diff: add interhunk context config option</title>
<updated>2017-01-12T20:55:43Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2017-01-12T12:21:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c488867793dc9b273c1d35746452d44afcd3d7f5'/>
<id>urn:sha1:c488867793dc9b273c1d35746452d44afcd3d7f5</id>
<content type='text'>
The --inter-hunk-context= option was added in commit 6d0e674a5754
("diff: add option to show context between close hunks"). This patch
allows configuring a default for this option.

Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/retire-compaction-heuristics'</title>
<updated>2017-01-10T23:24:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-10T23:24:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2ced5f2c2ddcfe3a45d75ae1d552c11cad70236d'/>
<id>urn:sha1:2ced5f2c2ddcfe3a45d75ae1d552c11cad70236d</id>
<content type='text'>
"git diff" and its family had two experimental heuristics to shift
the contents of a hunk to make the patch easier to read.  One of
them turns out to be better than the other, so leave only the
"--indent-heuristic" option and remove the other one.

* jc/retire-compaction-heuristics:
  diff: retire "compaction" heuristics
</content>
</entry>
</feed>
