Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 2, 2015
  1. Ben Walton Junio C Hamano

    kwset: use unsigned char to store values with high-bit set

    bdwalton authored gitster committed
    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 <bdwalton@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 15, 2012
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    ctype: support iscntrl, ispunct, isxdigit and isprint

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Nguyễn Thái Ngọc Duy Junio C Hamano

    ctype: make sane_ctype[] const array

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 7, 2012
  1. Junio C Hamano

    Merge branch 'jc/pickaxe-ignore-case'

    gitster authored
    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
Commits on Feb 28, 2012
  1. Junio C Hamano

    grep: use static trans-case table

    gitster authored
    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 <gitster@pobox.com>
Commits on Feb 10, 2012
  1. Junio C Hamano

    ctype.c only wants git-compat-util.h

    Namhyung Kim authored gitster committed
    The implementation of sane ctype macros only depends on symbols in
    git-compat-util.h not cache.h
    
    Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 8, 2011
  1. Junio C Hamano

    magic pathspec: futureproof shorthand form

    gitster authored
    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 <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 31, 2010
  1. Junio C Hamano

    enums: omit trailing comma for portability

    Gary V. Vaughan authored gitster committed
    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 <gary@thewrittenword.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 1, 2009
  1. Junio C Hamano

    ctype.c: fix typo in comment

    René Scharfe authored gitster committed
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 18, 2009
  1. Junio C Hamano

    Add is_regex_special()

    René Scharfe authored gitster committed
    Add is_regex_special(), a character class macro for chars that have a
    special meaning in regular expressions.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Junio C Hamano

    Change NUL char handling of isspecial()

    René Scharfe authored gitster committed
    Replace isspecial() by the new macro is_glob_special(), which is more,
    well, specialized.  The former included the NUL char in its character
    class, while the letter only included characters that are special to
    file name globbing.
    
    The new name contains underscores because they enhance readability
    considerably now that it's made up of three words.  Renaming the
    function is necessary to document its changed scope.
    
    The call sites of isspecial() are updated to check explicitly for NUL.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Junio C Hamano

    Reformat ctype.c

    René Scharfe authored gitster committed
    Enhance the readability of ctype.c by using an enum instead of macros
    to initialize the character class table.  This allows the use of a single
    letter to mark a char, making the table fit within 80 columns.
    
    Also list the index of the last entry in each row in the following comment.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 29, 2008
  1. Junio C Hamano

    dir.c: Avoid c99 array initialization

    Brandon Casey authored gitster committed
    The following syntax:
    
            char foo[] = {
                    [0] = 1,
                    [7] = 2,
                    [15] = 3
            };
    
    is a c99 construct which some compilers do not support even though they
    support other c99 constructs. This construct can be avoided by folding
    these 'special' test cases into the sane_ctype array and making use of
    the related infrastructure.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 27, 2008
  1. Junio C Hamano

    ctype.c: protect tiny C preprocessor constants

    gitster authored
    Some platforms contaminate the preprocessor token namespace with their own
    definition of SS without being asked.  Avoid getting hit by redefinition
    warning messages by explicitly undef SS, AA and DD shorthand we use in this
    table definition.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 7, 2007
  1. Junio C Hamano

    War on whitespace

    gitster authored
    This uses "git-apply --whitespace=strip" to fix whitespace errors that have
    crept in to our source files over time.  There are a few files that need
    to have trailing whitespaces (most notably, test vectors).  The results
    still passes the test, and build result in Documentation/ area is unchanged.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 15, 2005
  1. Unlocalized isspace and friends

    Linus Torvalds authored Junio C Hamano committed
    Do our own ctype.h, just to get the sane semantics: we want
    locale-independence, _and_ we want the right signed behaviour. Plus we
    only use a very small subset of ctype.h anyway (isspace, isalpha,
    isdigit and isalnum).
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.