<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ctype.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-07-05T18:41:18Z</updated>
<entry>
<title>kwset: move translation table from ctype</title>
<updated>2023-07-05T18:41:18Z</updated>
<author>
<name>Calvin Wan</name>
<email>calvinwan@google.com</email>
</author>
<published>2023-07-05T17:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28aed75a9fe72f265bff24a02b962616b3f36ad3'/>
<id>urn:sha1:28aed75a9fe72f265bff24a02b962616b3f36ad3</id>
<content type='text'>
This table was originally introduced to solely be used with kwset
machinery (0f871cf56e), so it would make sense for it to belong in
kwset.[ch] rather than ctype.c and git-compat-util.h. It is only used in
diffcore-pickaxe.c, which already includes kwset.h so no other headers
have to be modified.

Signed-off-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>kwset: use unsigned char to store values with high-bit set</title>
<updated>2015-03-02T20:32:24Z</updated>
<author>
<name>Ben Walton</name>
<email>bdwalton@gmail.com</email>
</author>
<published>2015-03-02T19:22:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=189c860c9ec5deb95845c056ca5c15b58970158e'/>
<id>urn:sha1:189c860c9ec5deb95845c056ca5c15b58970158e</id>
<content type='text'>
Sun Studio on Solaris issues warnings about improper initialization
values being used when defining tolower_trans_tbl[] in ctype.c.  The
array wants to store values with high-bit set and treat them as
values between 128 to 255.  Unlike the rest of the Git codebase
where we explicitly specify 'unsigned char' for such variables and
arrays, however, kwset code we borrowed from elsewhere uses 'char'
for this and other variables.

Fix the declarations to explicitly use 'unsigned char' where
necessary to bring it in line with the rest of the Git.

Signed-off-by: Ben Walton &lt;bdwalton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ctype: support iscntrl, ispunct, isxdigit and isprint</title>
<updated>2012-10-15T21:58:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-10-15T06:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c149ab2ddc4a6d253e76d90067ea0fff2880ded'/>
<id>urn:sha1:1c149ab2ddc4a6d253e76d90067ea0fff2880ded</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>ctype: make sane_ctype[] const array</title>
<updated>2012-10-15T21:58:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-10-15T06:25:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca5ab7d1e813435bbf4ba0615a2adf0cdc35960e'/>
<id>urn:sha1:ca5ab7d1e813435bbf4ba0615a2adf0cdc35960e</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>Merge branch 'jc/pickaxe-ignore-case'</title>
<updated>2012-03-07T20:12:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-07T20:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e4d0875acbce3c881bc1de66c8900cdc240ebe8'/>
<id>urn:sha1:1e4d0875acbce3c881bc1de66c8900cdc240ebe8</id>
<content type='text'>
By Junio C Hamano (2) and Ramsay Jones (1)
* jc/pickaxe-ignore-case:
  ctype.c: Fix a sparse warning
  pickaxe: allow -i to search in patch case-insensitively
  grep: use static trans-case table
</content>
</entry>
<entry>
<title>grep: use static trans-case table</title>
<updated>2012-02-28T22:29:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-02-28T22:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f871cf56e83d13116b021295688e57f26bbf93d'/>
<id>urn:sha1:0f871cf56e83d13116b021295688e57f26bbf93d</id>
<content type='text'>
In order to prepare the kwset machinery for a case-insensitive search, we
used to use a static table of 256 elements and filled it every time before
calling kwsalloc().  Because the kwset machinery will never modify this
table, just allocate a single instance globally and fill it at the compile
time.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ctype.c only wants git-compat-util.h</title>
<updated>2012-02-10T20:53:55Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2012-02-10T02:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a191a22959b367e2867d78f89a363fdf69afe3b'/>
<id>urn:sha1:1a191a22959b367e2867d78f89a363fdf69afe3b</id>
<content type='text'>
The implementation of sane ctype macros only depends on symbols in
git-compat-util.h not cache.h

Signed-off-by: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>magic pathspec: futureproof shorthand form</title>
<updated>2011-04-08T23:19:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-04-08T23:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f6c9760debfb4705f6efb5862e2b3a23b2b951c'/>
<id>urn:sha1:2f6c9760debfb4705f6efb5862e2b3a23b2b951c</id>
<content type='text'>
The earlier design was to take whatever non-alnum that the short format
parser happens to support, leaving the rest as part of the pattern, so a
version of git that knows '*' magic and a version that does not would have
behaved differently when given ":*Makefile".  The former would have
applied the '*' magic to the pattern "Makefile", while the latter would
used no magic to the pattern "*Makefile".

Instead, just reserve all non-alnum ASCII letters that are neither glob
nor regexp special as potential magic signature, and when we see a magic
that is not supported, die with an error message, just like the longhand
codepath does.

With this, ":%#!*Makefile" will always mean "%#!" magic applied to the
pattern "*Makefile", no matter what version of git is used (it is a
different matter if the version of git supports all of these three magic
matching rules).

Also make ':' without anything else to mean "there is no pathspec".  This
would allow differences between "git log" and "git log ." run from the top
level of the working tree (the latter simplifies no-op commits away from
the history) to be expressed from a subdirectory by saying "git log :".

Helped-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>enums: omit trailing comma for portability</title>
<updated>2010-05-31T23:59:27Z</updated>
<author>
<name>Gary V. Vaughan</name>
<email>git@mlists.thewrittenword.com</email>
</author>
<published>2010-05-14T09:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b05548fc0523744b7a1276cfa0f4aae19d6d9c9'/>
<id>urn:sha1:4b05548fc0523744b7a1276cfa0f4aae19d6d9c9</id>
<content type='text'>
Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
5.1 fails to compile git.

enum style is inconsistent already, with some enums declared on one
line, some over 3 lines with the enum values all on the middle line,
sometimes with 1 enum value per line... and independently of that the
trailing comma is sometimes present and other times absent, often
mixing with/without trailing comma styles in a single file, and
sometimes in consecutive enum declarations.

Clearly, omitting the comma is the more portable style, and this patch
changes all enum declarations to use the portable omitted dangling
comma style consistently.

Signed-off-by: Gary V. Vaughan &lt;gary@thewrittenword.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ctype.c: fix typo in comment</title>
<updated>2009-05-01T23:07:29Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-05-01T20:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1087aba86b4a687cabf03d4a060d4b51282819d3'/>
<id>urn:sha1:1087aba86b4a687cabf03d4a060d4b51282819d3</id>
<content type='text'>
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>
