Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Dec 17, 2014
  1. @peff @gitster

    utf8: add is_hfs_dotgit() helper

    peff authored gitster committed
    We do not allow paths with a ".git" component to be added to
    the index, as that would mean repository contents could
    overwrite our repository files. However, asking "is this
    path the same as .git" is not as simple as strcmp() on some
    HFS+'s case-folding does more than just fold uppercase into
    lowercase (which we already handle with strcasecmp). It may
    also skip past certain "ignored" Unicode code points, so
    that (for example) ".gi\u200ct" is mapped ot ".git".
    The full list of folds can be found in the tables at:
    Implementing a full "is this path the same as that path"
    comparison would require us importing the whole set of
    tables.  However, what we want to do is much simpler: we
    only care about checking ".git". We know that 'G' is the
    only thing that folds to 'g', and so on, so we really only
    need to deal with the set of ignored code points, which is
    much smaller.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Commits on Jul 10, 2013
  1. @peff @gitster

    add missing "format" function attributes

    peff authored gitster committed
    For most of our functions that take printf-like formats, we
    use gcc's __attribute__((format)) to get compiler warnings
    when the functions are misused. Let's give a few more
    functions the same protection.
    In most cases, the annotations do not uncover any actual
    bugs; the only code change needed is that we passed a size_t
    to transfer_debug, which expected an int. Since we expect
    the passed-in value to be a relatively small buffer size
    (and cast a similar value to int directly below), we can
    just cast away the problem.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Commits on Feb 23, 2011
  1. @peff @gitster

    strbuf: add fixed-length version of add_wrapped_text

    peff authored gitster committed
    The function strbuf_add_wrapped_text takes a NUL-terminated
    string. This makes it annoying to wrap strings we have as a
    pointer and a length.
    Refactoring strbuf_add_wrapped_text and all of its
    sub-functions to handle fixed-length strings turned out to
    be really ugly. So this implementation is lame; it just
    strdups the text and operates on the NUL-terminated version.
    This should be fine as the strings we are wrapping are
    generally pretty short.  If it becomes a problem, we can
    optimize later.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.