<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/utf8.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-29T08:10:05Z</updated>
<entry>
<title>Sync with Git 2.17.1</title>
<updated>2018-05-29T08:10:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-29T08:09:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7913f53b5628997165e075008d6142da1c04271a'/>
<id>urn:sha1:7913f53b5628997165e075008d6142da1c04271a</id>
<content type='text'>
* maint: (25 commits)
  Git 2.17.1
  Git 2.16.4
  Git 2.15.2
  Git 2.14.4
  Git 2.13.7
  fsck: complain when .gitmodules is a symlink
  index-pack: check .gitmodules files with --strict
  unpack-objects: call fsck_finish() after fscking objects
  fsck: call fsck_finish() after fscking objects
  fsck: check .gitmodules content
  fsck: handle promisor objects in .gitmodules check
  fsck: detect gitmodules files
  fsck: actually fsck blob data
  fsck: simplify ".git" check
  index-pack: make fsck error message more specific
  verify_path: disallow symlinks in .gitmodules
  update-index: stat updated files earlier
  verify_dotfile: mention case-insensitivity in comment
  verify_path: drop clever fallthrough
  skip_prefix: add case-insensitive variant
  ...
</content>
</entry>
<entry>
<title>Sync with Git 2.14.4</title>
<updated>2018-05-22T05:15:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-22T05:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e0f06d55df5855178ff41342937943604f6e97c'/>
<id>urn:sha1:9e0f06d55df5855178ff41342937943604f6e97c</id>
<content type='text'>
* maint-2.14:
  Git 2.14.4
  Git 2.13.7
  verify_path: disallow symlinks in .gitmodules
  update-index: stat updated files earlier
  verify_dotfile: mention case-insensitivity in comment
  verify_path: drop clever fallthrough
  skip_prefix: add case-insensitive variant
  is_{hfs,ntfs}_dotgitmodules: add tests
  is_ntfs_dotgit: match other .git files
  is_hfs_dotgit: match other .git files
  is_ntfs_dotgit: use a size_t for traversing string
  submodule-config: verify submodule names as paths
</content>
</entry>
<entry>
<title>is_hfs_dotgit: match other .git files</title>
<updated>2018-05-22T03:50:11Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-05-02T19:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0fc333ba20b43a8afee5023e92cb3384ff4e59a6'/>
<id>urn:sha1:0fc333ba20b43a8afee5023e92cb3384ff4e59a6</id>
<content type='text'>
Both verify_path() and fsck match ".git", ".GIT", and other
variants specific to HFS+. Let's allow matching other
special files like ".gitmodules", which we'll later use to
enforce extra restrictions via verify_path() and fsck.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ls/checkout-encoding'</title>
<updated>2018-05-08T06:59:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1ac0ce4d32ab7a3546e7e84a562625576208c7db'/>
<id>urn:sha1:1ac0ce4d32ab7a3546e7e84a562625576208c7db</id>
<content type='text'>
The new "checkout-encoding" attribute can ask Git to convert the
contents to the specified encoding when checking out to the working
tree (and the other way around when checking in).

* ls/checkout-encoding:
  convert: add round trip check based on 'core.checkRoundtripEncoding'
  convert: add tracing for 'working-tree-encoding' attribute
  convert: check for detectable errors in UTF encodings
  convert: add 'working-tree-encoding' attribute
  utf8: add function to detect a missing UTF-16/32 BOM
  utf8: add function to detect prohibited UTF-16/32 BOM
  utf8: teach same_encoding() alternative UTF encoding names
  strbuf: add a case insensitive starts_with()
  strbuf: add xstrdup_toupper()
  strbuf: remove unnecessary NUL assignment in xstrdup_tolower()
</content>
</entry>
<entry>
<title>utf8: add function to detect a missing UTF-16/32 BOM</title>
<updated>2018-04-16T02:40:56Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2018-04-15T18:16:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6e48652f69f6955bbbb423100e0df2a49467db8'/>
<id>urn:sha1:c6e48652f69f6955bbbb423100e0df2a49467db8</id>
<content type='text'>
If the endianness is not defined in the encoding name, then let's
be strict and require a BOM to avoid any encoding confusion. The
is_missing_required_utf_bom() function returns true if a required BOM
is missing.

The Unicode standard instructs to assume big-endian if there in no BOM
for UTF-16/32 [1][2]. However, the W3C/WHATWG encoding standard used
in HTML5 recommends to assume little-endian to "deal with deployed
content" [3]. Strictly requiring a BOM seems to be the safest option
for content in Git.

This function is used in a subsequent commit.

[1] http://unicode.org/faq/utf_bom.html#gen6
[2] http://www.unicode.org/versions/Unicode10.0.0/ch03.pdf
     Section 3.10, D98, page 132
[3] https://encoding.spec.whatwg.org/#utf-16le

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: add function to detect prohibited UTF-16/32 BOM</title>
<updated>2018-04-16T02:40:56Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2018-04-15T18:16:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10ecb82e4f1f507d5f122e00fd4829b30953f853'/>
<id>urn:sha1:10ecb82e4f1f507d5f122e00fd4829b30953f853</id>
<content type='text'>
Whenever a data stream is declared to be UTF-16BE, UTF-16LE, UTF-32BE
or UTF-32LE a BOM must not be used [1]. The function returns true if
this is the case.

This function is used in a subsequent commit.

[1] http://unicode.org/faq/utf_bom.html#bom10

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: teach same_encoding() alternative UTF encoding names</title>
<updated>2018-04-16T02:40:56Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2018-04-15T18:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f0c4a362c5db677ee392a6a550632bfb22d8319'/>
<id>urn:sha1:2f0c4a362c5db677ee392a6a550632bfb22d8319</id>
<content type='text'>
The function same_encoding() could only recognize alternative names for
UTF-8 encodings. Teach it to recognize all kinds of alternative UTF
encoding names (e.g. utf16).

While we are at it, fix a crash that would occur if same_encoding() was
called with a NULL argument and a non-NULL argument.

This function is used in a subsequent commit.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>unicode_width.h: rename to use dash in file name</title>
<updated>2018-04-11T09:11:00Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-10T21:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e233bef43e4a73ec183eb927ab4803aefc77bab9'/>
<id>urn:sha1:e233bef43e4a73ec183eb927ab4803aefc77bab9</id>
<content type='text'>
This is more consistent with the project style. The majority of Git's
source files use dashes in preference to underscores in their file names.

Also adjust contrib/update-unicode as well.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
</content>
</entry>
<entry>
<title>cleanup: fix possible overflow errors in binary search</title>
<updated>2017-10-09T23:57:24Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2017-10-08T18:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19716b21a4255ecc7148b54ab2c78039c59f25bf'/>
<id>urn:sha1:19716b21a4255ecc7148b54ab2c78039c59f25bf</id>
<content type='text'>
A common mistake when writing binary search is to allow possible
integer overflow by using the simple average:

	mid = (min + max) / 2;

Instead, use the overflow-safe version:

	mid = min + (max - min) / 2;

This translation is safe since the operation occurs inside a loop
conditioned on "min &lt; max". The included changes were found using
the following git grep:

	git grep '/ *2;' '*.c'

Making this cleanup will prevent future review friction when a new
binary search is contructed based on existing code.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: release strbuf on error return in strbuf_utf8_replace()</title>
<updated>2017-09-06T23:49:28Z</updated>
<author>
<name>Rene Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-08-30T18:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a012bf32a3b21648ab96f2bd234a563c22e0ae7'/>
<id>urn:sha1:9a012bf32a3b21648ab96f2bd234a563c22e0ae7</id>
<content type='text'>
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>
</feed>
