<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/utf8.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-27T01:16:23Z</updated>
<entry>
<title>utf8: accept "latin-1" as ISO-8859-1</title>
<updated>2016-09-27T01:16:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-27T01:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df3755888b9a54e69ab70881738d431587c57951'/>
<id>urn:sha1:df3755888b9a54e69ab70881738d431587c57951</id>
<content type='text'>
Even though latin-1 is still seen in e-mail headers, some platforms
only install ISO-8859-1.  "iconv -f ISO-8859-1" succeeds, while
"iconv -f latin-1" fails on such a system.

Using the same fallback_encoding() mechanism factored out in the
previous step, teach ourselves that "ISO-8859-1" has a better chance
of being accepted than "latin-1".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: refactor code to decide fallback encoding</title>
<updated>2016-09-27T01:16:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-27T01:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3270741ea8c2a225183d272bf19ea19d5b3c05d8'/>
<id>urn:sha1:3270741ea8c2a225183d272bf19ea19d5b3c05d8</id>
<content type='text'>
The codepath we use to call iconv_open() has a provision to use a
fallback encoding when it fails, hoping that "UTF-8" being spelled
differently could be the reason why the library function did not
like the encoding names we gave it.  Essentially, we turn what we
have observed to be used as variants of "UTF-8" (e.g. "utf8") into
the most official spelling and use that as a fallback.

We do the same thing for input and output encoding.  Introduce a
helper function to do just one side and call that twice.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8: add function to align a string into given strbuf</title>
<updated>2015-09-17T17:02:48Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-09-10T15:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=110dcda50d5ddaf3557666eea3b012a6ccc74dce'/>
<id>urn:sha1:110dcda50d5ddaf3557666eea3b012a6ccc74dce</id>
<content type='text'>
Add strbuf_utf8_align() which will align a given string into a strbuf
as per given align_type and width. If the width is greater than the
string length then no alignment is performed.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>utf8-bom: introduce skip_utf8_bom() helper</title>
<updated>2015-04-16T18:35:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-16T17:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dde843e7378f65004415bd108038659de9ce2abd'/>
<id>urn:sha1:dde843e7378f65004415bd108038659de9ce2abd</id>
<content type='text'>
With the recent change to ignore the UTF8 BOM at the beginning of
.gitignore files, we now have two codepaths that do such a skipping
(the other one is for reading the configuration files).

Introduce utf8_bom[] constant string and skip_utf8_bom() helper
and teach .gitignore code how to use it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint-2.1' into maint</title>
<updated>2015-01-07T21:28:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T21:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ba46269a04de20032bd2dd614be6290cd65caab'/>
<id>urn:sha1:7ba46269a04de20032bd2dd614be6290cd65caab</id>
<content type='text'>
* maint-2.1:
  is_hfs_dotgit: loosen over-eager match of \u{..47}
</content>
</entry>
<entry>
<title>Merge branch 'maint-2.0' into maint-2.1</title>
<updated>2015-01-07T21:27:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T21:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c84ac86fc896c108b789b8eb26b169cc0e8088a'/>
<id>urn:sha1:3c84ac86fc896c108b789b8eb26b169cc0e8088a</id>
<content type='text'>
* maint-2.0:
  is_hfs_dotgit: loosen over-eager match of \u{..47}
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.9' into maint-2.0</title>
<updated>2015-01-07T21:27:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T21:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=282616c72d1d08a77ca4fe1186cb708c38408d87'/>
<id>urn:sha1:282616c72d1d08a77ca4fe1186cb708c38408d87</id>
<content type='text'>
* maint-1.9:
  is_hfs_dotgit: loosen over-eager match of \u{..47}
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.8.5' into maint-1.9</title>
<updated>2015-01-07T21:27:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T21:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64a03e970ab3ef0ce45d6bd3c1de1bff1de2beee'/>
<id>urn:sha1:64a03e970ab3ef0ce45d6bd3c1de1bff1de2beee</id>
<content type='text'>
* maint-1.8.5:
  is_hfs_dotgit: loosen over-eager match of \u{..47}
</content>
</entry>
<entry>
<title>is_hfs_dotgit: loosen over-eager match of \u{..47}</title>
<updated>2014-12-29T20:06:27Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-12-23T08:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6aaf956b08cfab2dcaa1a1afe4192390d0ef14fd'/>
<id>urn:sha1:6aaf956b08cfab2dcaa1a1afe4192390d0ef14fd</id>
<content type='text'>
Our is_hfs_dotgit function relies on the hackily-implemented
next_hfs_char to give us the next character that an HFS+
filename comparison would look at. It's hacky because it
doesn't implement the full case-folding table of HFS+; it
gives us just enough to see if the path matches ".git".

At the end of next_hfs_char, we use tolower() to convert our
32-bit code point to lowercase. Our tolower() implementation
only takes an 8-bit char, though; it throws away the upper
24 bits. This means we can't have any false negatives for
is_hfs_dotgit. We only care about matching 7-bit ASCII
characters in ".git", and we will correctly process 'G' or
'g'.

However, we _can_ have false positives. Because we throw
away the upper bits, code point \u{0147} (for example) will
look like 'G' and get downcased to 'g'. It's not known
whether a sequence of code points whose truncation ends up
as ".git" is meaningful in any language, but it does not
hurt to be more accurate here. We can just pass out the full
32-bit code point, and compare it manually to the upper and
lowercase characters we care about.

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>Sync with v2.1.4</title>
<updated>2014-12-17T19:46:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-17T19:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77933f4449b8d6aa7529d627f3c7b55336f491db'/>
<id>urn:sha1:77933f4449b8d6aa7529d627f3c7b55336f491db</id>
<content type='text'>
* maint-2.1:
  Git 2.1.4
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
</content>
</entry>
</feed>
