Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 12, 2010
  1. @gitster

    utf8.c: mark file-local function static

    gitster authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 23, 2009
  1. @gitster

    strbuf_add_wrapped_text(): skip over colour codes

    René Scharfe authored gitster committed
    Ignore display mode escape sequences (colour codes) for the purpose of
    text wrapping because they don't have a visible width.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    strbuf_add_wrapped_text(): factor out strbuf_add_indented_text()

    René Scharfe authored gitster committed
    Add a new helper function, strbuf_add_indented_text(), to indent text
    without a width limit, and call it from strbuf_add_wrapped_text().  It
    respects both indent (applied to the first line) and indent2 (applied to
    the rest of the lines); indent2 was ignored by the indent-only path of
    strbuf_add_wrapped_text() before the patch.
    
    Two simple test cases are added, one exercising strbuf_add_wrapped_text()
    and the other strbuf_add_indented_text().
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 23, 2009
  1. @gitster

    Teach --wrap to only indent without wrapping

    gitster authored
    When a zero or negative width is given to "shortlog -w<width>,<in1>,<in2>"
    and --format=%[wrap(w,in1,in2)...%], just indent the text by in1 without
    wrapping.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 19, 2009
  1. @dscho @gitster

    Add strbuf_add_wrapped_text() to utf8.[ch]

    dscho authored gitster committed
    The newly added function can rewrap text according to a given first-line
    indent, other-indent and text width.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  2. @dscho @gitster

    print_wrapped_text(): allow hard newlines

    dscho authored gitster committed
    print_wrapped_text() will insert its own newlines. Up until now, if the
    text passed to it contained newlines, they would not be handled properly
    (the wrapping got confused after that).
    
    The strategy is to replace a single new-line with a space, but keep double
    new-lines so that already-wrapped text with empty lines between paragraphs
    will be handled properly.
    
    However, single new-line characters are only handled this way if the
    character after it is an alphanumeric character, as per Linus' suggestion.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Commits on Jun 6, 2009
  1. @drafnel @gitster

    On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX…

    drafnel authored gitster committed
    … spec
    
    OLD_ICONV is only necessary on Solaris until UNIX03.  This is indicated
    by the private macro _XPG6 which is set in /usr/include/sys/feature_tests.h.
    
    Signed-off-by: Brandon Casey <drafnel@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 5, 2009
  1. @geofft @gitster

    utf8: add utf8_strwidth()

    geofft authored gitster committed
    I'm about to use this pattern more than once, so make it a common function.
    
    Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 7, 2008
  1. @gitster

    utf8_width(): allow non NUL-terminated input

    gitster authored
    The original interface assumed that the input string is
    always terminated with a NUL, but that wasn't too useful.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    utf8: pick_one_utf8_char()

    gitster authored
    utf8_width() function was doing two different things.  To pick a
    valid character from UTF-8 stream, and compute the display width of
    that character.  This splits the former to a separate function
    pick_one_utf8_char().
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 16, 2007
  1. @gitster

    Remove unreachable statements

    Guido Ostkamp authored gitster committed
    Solaris Workshop Compiler found a few unreachable statements.
    
    Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 8, 2007
  1. @gitster

    Style: place opening brace of a function definition at column 1

    gitster authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 8, 2007
  1. wcwidth redeclaration

    Amos Waterland authored Junio C Hamano committed
    Build fails for git 1.5.1.3 on AIX, with the message:
    
    utf8.c:66: error: conflicting types for 'wcwidth'
    /.../lib/gcc/powerpc-ibm-aix5.3.0.0/4.0.3/include/string.h:266: error: previous declaration of 'wcwidth' was here
    
    Fix this by renaming our static variant to our own name.
    
    Signed-off-by: Amos Waterland <apw@us.ibm.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 4, 2007
  1. Merge branch 'maint'

    Junio C Hamano authored
    * maint:
      Unset NO_C99_FORMAT on Cygwin.
      Fix a "pointer type missmatch" warning.
      Fix some "comparison is always true/false" warnings.
      Fix an "implicit function definition" warning.
      Fix a "label defined but unreferenced" warning.
      Document the config variable format.suffix
      git-merge: fail correctly when we cannot fast forward.
      builtin-archive: use RUN_SETUP
      Fix git-gc usage note
  2. Fix a "pointer type missmatch" warning.

    Ramsay Jones authored Junio C Hamano committed
    In particular, the second parameter in the call to iconv() will
    cause this warning if your library declares iconv() with the
    second (input buffer pointer) parameter of type const char **.
    This is the old prototype, which is none-the-less used by the
    current version of newlib on Cygwin. (It appears in old versions
    of glibc too).
    
    Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Fix some "comparison is always true/false" warnings.

    Ramsay Jones authored Junio C Hamano committed
    On Cygwin the wchar_t type is an unsigned short (16-bit) int.
    This results in the above warnings from the return statement in
    the wcwidth() function (in particular, the expressions involving
    constants with values larger than 0xffff). Simply replace the
    use of wchar_t with an unsigned int, typedef-ed as ucs_char_t.
    
    Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 2, 2007
  1. @dscho

    print_wrapped_text: fix output for negative indent

    dscho authored Junio C Hamano committed
    When providing a negative indent, it means that -indent columns were
    already printed. Fix a bug where the function ate the first character
    if already the first word did not fit into the first line.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 28, 2007
  1. @dscho

    Actually make print_wrapped_text() useful

    dscho authored Junio C Hamano committed
    Now, it returns the current column, does not add a newline, and you can
    pass a negative indent, to indicate that the indent was already printed.
    
    With this, you can actually continue in the middle of a paragraph, not
    having to print everything into a buffer first.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 30, 2006
  1. commit-tree: cope with different ways "utf-8" can be spelled.

    Junio C Hamano authored
    People can spell config.commitencoding differently from what we
    internally have ("utf-8") to mean UTF-8.  Try to accept them and
    treat them equally.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 26, 2006
  1. Move encoding conversion routine out of mailinfo to utf8.c

    Junio C Hamano authored
    This moves the body of convert_to_utf8() routine used in mailinfo
    to the utf8.c i18n library.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 24, 2006
  1. @dscho

    commit-tree: encourage UTF-8 commit messages.

    dscho authored Junio C Hamano committed
    Introduce is_utf() to check if a text looks like it is encoded
    in UTF-8, utf8_width() to count display width, and implements
    print_wrapped_text() using them.
    
    git-commit-tree warns if the commit message does not minimally
    conform to the UTF-8 encoding when i18n.commitencoding is either
    unset, or set to "utf-8".
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.