<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/xdiff, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-06-30T21:07:58Z</updated>
<entry>
<title>git-merge-file: do not add LF at EOF while applying unrelated change</title>
<updated>2014-06-30T21:07:58Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2014-06-28T22:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba311807f8408761a48d4cd596259ca30a4375f2'/>
<id>urn:sha1:ba311807f8408761a48d4cd596259ca30a4375f2</id>
<content type='text'>
If 'current-file' does not contain LF at EOF, and change between
'base-file' and 'other-file' does not change any line close to EOF, the
3-way merge should not add LF to EOF.  This is what 'diff3 -m' does, and
seems to be a reasonable expectation.

The change which introduced the behavior is cd1d61c44f. It always calls
function xdl_recs_copy() for sides with add_nl == 1. In fact, it looks
like the only case when this is needed is when 2 files are being
union-merged, and they do not have LF at EOF (strictly speaking, the
first of them).

Add tests:
* "merge without conflict (missing LF at EOF, away from change in the
other file)" and "merge does not add LF away of change", to demonstrate
the changed behavior.
* "conflict at EOF without LF resolved by --union", to verify that the
union-merge at the end inerts newline between versions.
* some more tests which I felt like not covering the functionality well

Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>C: have space around &amp;&amp; and || operators</title>
<updated>2013-10-16T17:26:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-16T17:26:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c01499ef6933bd0e3fc65277559dc80f13d6a49e'/>
<id>urn:sha1:c01499ef6933bd0e3fc65277559dc80f13d6a49e</id>
<content type='text'>
Correct all hits from

    git grep -e '\(&amp;&amp;\|||\)[^ ]' -e '[^	 ]\(&amp;&amp;\|||\)' -- '*.c'

i.e. &amp;&amp; or || operators that are followed by anything but a SP,
or that follow something other than a SP or a HT, so that these
operators have a SP around it when necessary.

We usually refrain from making this kind of a tree-wide change in
order to avoid unnecessary conflicts with other "real work" patches,
but in this case, the end result does not have a potentially
cumbersome tree-wide impact, while this is a tree-wide cleanup.

Fixes to compat/regex/regcomp.c and xdiff/xemit.c are to replace a
HT immediately after &amp;&amp; with a SP.

This is based on Felipe's patch to bultin/symbolic-ref.c; I did all
the finding out what other files in the whole tree need to be fixed
and did the fix and also the log message while reviewing that single
liner, so any screw-ups in this version are mine.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: add --ignore-blank-lines option</title>
<updated>2013-06-19T22:17:45Z</updated>
<author>
<name>Antoine Pelisse</name>
<email>apelisse@gmail.com</email>
</author>
<published>2013-06-19T18:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36617af7ed594d1928554356d809bd611c642dd2'/>
<id>urn:sha1:36617af7ed594d1928554356d809bd611c642dd2</id>
<content type='text'>
The goal of the patch is to introduce the GNU diff
-B/--ignore-blank-lines as closely as possible. The short option is not
available because it's already used for "break-rewrites".

When this option is used, git-diff will not create hunks that simply
add or remove empty lines, but will still show empty lines
addition/suppression if they are close enough to "valuable" changes.

There are two differences between this option and GNU diff -B option:
- GNU diff doesn't have "--inter-hunk-context", so this must be handled
- The following sequence looks like a bug (context is displayed twice):

    $ seq 5 &gt;file1
    $ cat &lt;&lt;EOF &gt;file2
    change
    1
    2

    3
    4
    5
    change
    EOF
    $ diff -u -B file1 file2
    --- file1	2013-06-08 22:13:04.471517834 +0200
    +++ file2	2013-06-08 22:13:23.275517855 +0200
    @@ -1,5 +1,7 @@
    +change
     1
     2
    +
     3
     4
     5
    @@ -3,3 +5,4 @@
     3
     4
     5
    +change

So here is a more thorough description of the option:
- real changes are interesting
- blank lines that are close enough (less than context size) to
interesting changes are considered interesting (recursive definition)
- "context" lines are used around each hunk of interesting changes
- If two hunks are separated by less than "inter-hunk-context", they
will be merged into one.

The implementation does the "interesting changes selection" in a single
pass.

Signed-off-by: Antoine Pelisse &lt;apelisse@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Correct common spelling mistakes in comments and tests</title>
<updated>2013-04-12T20:38:40Z</updated>
<author>
<name>Stefano Lattarini</name>
<email>stefano.lattarini@gmail.com</email>
</author>
<published>2013-04-11T22:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41ccfdd9c931ee71b09f38f4eb19cf44a8e4381d'/>
<id>urn:sha1:41ccfdd9c931ee71b09f38f4eb19cf44a8e4381d</id>
<content type='text'>
Most of these were found using Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini &lt;stefano.lattarini@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Acked-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/xdiff-fast-hash-fix'</title>
<updated>2012-05-25T19:05:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-05-25T19:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0bc8bea2b4d73b20ce418b88300f498396d0a924'/>
<id>urn:sha1:0bc8bea2b4d73b20ce418b88300f498396d0a924</id>
<content type='text'>
Fixes compilation issue on 32-bit in an earlier series.
</content>
</entry>
<entry>
<title>xdiff: import new 32-bit version of count_masked_bytes()</title>
<updated>2012-05-23T16:10:17Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-05-22T20:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8072766cc6756e9218ea7c9433b097b696329407'/>
<id>urn:sha1:8072766cc6756e9218ea7c9433b097b696329407</id>
<content type='text'>
Import the latest 32-bit implementation of count_masked_bytes() from
Linux (arch/x86/include/asm/word-at-a-time.h).  It's shorter and avoids
overflows and negative numbers.

This fixes test failures on 32-bit, where negative partial results had
been shifted right using the "wrong" method (logical shift right instead
of arithmetic short right).  The compiler is free to chose the method,
so it was only wrong in the sense that it didn't work as intended by us.

Reported-by: Øyvind A. Holm &lt;sunny@sunbase.org&gt;
Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff: avoid more compiler warnings with XDL_FAST_HASH on 32-bit machines</title>
<updated>2012-05-23T16:10:03Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-05-22T20:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e356a979459092d10450e66d8512381e89c2570'/>
<id>urn:sha1:7e356a979459092d10450e66d8512381e89c2570</id>
<content type='text'>
Hide literals that can cause compiler warnings for 32-bit architectures in
expressions that evaluate to small numbers there.  Some compilers warn that
0x0001020304050608 won't fit into a 32-bit long, others that shifting right
by 56 bits clears a 32-bit value completely.

The correct values are calculated in the 64-bit case, which is all that matters
in this if-branch.

Reported-by: Øyvind A. Holm &lt;sunny@sunbase.org&gt;
Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Acked-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff: avoid compiler warnings with XDL_FAST_HASH on 32-bit machines</title>
<updated>2012-05-22T21:39:49Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-05-22T20:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9322ce21eeb4ad92d0cdd37d0d62a69368042fec'/>
<id>urn:sha1:9322ce21eeb4ad92d0cdd37d0d62a69368042fec</id>
<content type='text'>
Import macro REPEAT_BYTE from Linux (arch/x86/include/asm/word-at-a-time.h)
to avoid 64-bit integer literals, which cause some 32-bit compilers to
print warnings.

Reported-by: Øyvind A. Holm &lt;sunny@sunbase.org&gt;
Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff: remove unused functions</title>
<updated>2012-05-09T21:13:05Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-05-09T20:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be89977543c7798411f336236a506bf07b0a3d71'/>
<id>urn:sha1:be89977543c7798411f336236a506bf07b0a3d71</id>
<content type='text'>
The functions xdl_cha_first(), xdl_cha_next() and xdl_atol() are not used
by us.  While removing them increases the difference to the upstream
version of libxdiff, it only adds a bit to the more than 600 differing
lines in xutils.c (mmfile_t management was simplified significantly when
the library was imported initially).  Besides, if upstream modifies these
functions in the future, we won't need to think about importing those
changes, so in that sense it makes tracking modifications easier.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff: remove emit_func() and xdi_diff_hunks()</title>
<updated>2012-05-09T21:08:42Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-05-09T20:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3319e606336c13ba6475d83e700ca53537cedfd9'/>
<id>urn:sha1:3319e606336c13ba6475d83e700ca53537cedfd9</id>
<content type='text'>
The functions are unused now, remove them.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
