<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/utf8.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-04-16T20:38:57Z</updated>
<entry>
<title>Merge branch 'tb/unicode-6.3-zero-width'</title>
<updated>2014-04-16T20:38:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-16T20:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9fd911a8101bf4d3bff4e2e61a138505eb39eace'/>
<id>urn:sha1:9fd911a8101bf4d3bff4e2e61a138505eb39eace</id>
<content type='text'>
Teach our display-column-counting logic about decomposed umlauts
and friends.

* tb/unicode-6.3-zero-width:
  utf8.c: partially update to version 6.3
</content>
</entry>
<entry>
<title>utf8.c: partially update to version 6.3</title>
<updated>2014-04-09T17:14:05Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2014-04-07T19:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d813ab970db8b57b70bdd1b7e5feddec1c3fd84e'/>
<id>urn:sha1:d813ab970db8b57b70bdd1b7e5feddec1c3fd84e</id>
<content type='text'>
Unicode 6.3 defines more code points as combining or accents.  For
example, the character "ö" could be expressed as an "o" followed by
U+0308 COMBINING DIARESIS (aka umlaut, double-dot-above).  We should
consider that such a sequence of two codepoints occupies one display
column for the alignment purposes, and for that, git_wcwidth()
should return 0 for them.  Affected codepoints are:

    U+0358..U+035C
    U+0487
    U+05A2, U+05BA, U+05C5, U+05C7
    U+0604, U+0616..U+061A, U+0659..U+065F

Earlier unicode standards had defined these as "reserved".

Only the range 0..U+07FF has been checked to see which codepoints
need to be marked as 0-width while preparing for this commit; more
updates may be needed.

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: use correct type for values in interval table</title>
<updated>2014-02-18T23:51:40Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-02-16T16:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a68a67dea399f15305b059aa36c007cfdde2890e'/>
<id>urn:sha1:a68a67dea399f15305b059aa36c007cfdde2890e</id>
<content type='text'>
We treat these as unsigned everywhere and compare against unsigned
values, so declare them using the typedef we already have for this.

While we're here, fix the indentation as well.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: fix iconv error detection</title>
<updated>2014-02-18T23:51:33Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-02-16T16:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df5213b70d29e65aaff17d2577e42787e5a272bb'/>
<id>urn:sha1:df5213b70d29e65aaff17d2577e42787e5a272bb</id>
<content type='text'>
iconv(3) returns "(size_t) -1" on error.  Make sure that we cast the
"-1" properly when checking for this.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: Fix bug in truncation support for %&gt;, %&lt; and %&gt;&lt;</title>
<updated>2013-04-28T19:09:37Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-04-27T19:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=980419b99306b326d44d740a95f3401e169ad943'/>
<id>urn:sha1:980419b99306b326d44d740a95f3401e169ad943</id>
<content type='text'>
Some systems experience failures in t4205-*.sh (tests 18-20, 27)
which all relate to the use of truncation with the %&lt; padding
placeholder. This capability was added in the commit a7f01c6b
("pretty: support truncating in %&gt;, %&lt; and %&gt;&lt;", 19-04-2013).

The truncation support was implemented with the assistance of a
new strbuf function (strbuf_utf8_replace). This function contains
the following code:

       strbuf_attach(sb_src, strbuf_detach(&amp;sb_dst, NULL),
                     sb_dst.len, sb_dst.alloc);

Unfortunately, this code is subject to unspecified behaviour. In
particular, the order of evaluation of the argument expressions
(along with the associated side effects) is not specified by the
C standard. Note that the second argument expression is a call to
strbuf_detach() which, as a side effect, sets the 'len' and 'alloc'
fields of the sb_dst argument to zero. Depending on the order of
evaluation of the argument expressions to the strbuf_attach call,
this can lead to assigning an empty string to 'sb_src'.

In order to remove the undesired behaviour, we replace the above
line of code with:

       strbuf_swap(sb_src, &amp;sb_dst);
       strbuf_release(&amp;sb_dst);

which achieves the desired effect without provoking unspecified
behaviour.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: support %&gt;&gt; that steal trailing spaces</title>
<updated>2013-04-18T23:28:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-04-18T23:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1640632b4f3f69775f04e9e40dfd2fd912e0f458'/>
<id>urn:sha1:1640632b4f3f69775f04e9e40dfd2fd912e0f458</id>
<content type='text'>
This is pretty useful in `%&lt;(100)%s%Cred%&gt;(20)% an' where %s does not
use up all 100 columns and %an needs more than 20 columns. By
replacing %&gt;(20) with %&gt;&gt;(20), %an can steal spaces from %s.

%&gt;&gt; understands escape sequences, so %Cred does not stop it from
stealing spaces in %&lt;(100).

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>pretty: support truncating in %&gt;, %&lt; and %&gt;&lt;</title>
<updated>2013-04-18T23:28:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-04-18T23:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba'/>
<id>urn:sha1:a7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba</id>
<content type='text'>
%&gt;(N,trunc) truncates the right part after N columns and replace the
last two letters with "..". ltrunc does the same on the left. mtrunc
cuts the middle out.

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>utf8.c: add reencode_string_len() that can handle NULs in string</title>
<updated>2013-04-18T23:28:28Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-04-18T23:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b782bbab94e3618aea352907caa77321b487b918'/>
<id>urn:sha1:b782bbab94e3618aea352907caa77321b487b918</id>
<content type='text'>
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>utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences</title>
<updated>2013-04-18T23:28:28Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-04-18T23:08:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2bc1e7ecba1fcd73112d5e6703bdc28fb4da530a'/>
<id>urn:sha1:2bc1e7ecba1fcd73112d5e6703bdc28fb4da530a</id>
<content type='text'>
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>utf8.c: move display_mode_esc_sequence_len() for use by other functions</title>
<updated>2013-04-18T23:28:27Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-04-18T23:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4247fe79567fed2c9f896e2cc20246d71d8a33a2'/>
<id>urn:sha1:4247fe79567fed2c9f896e2cc20246d71d8a33a2</id>
<content type='text'>
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>
</feed>
