Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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 <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 8, 2011
  1. @peff @gitster

    trace: give repo_setup trace its own key

    peff authored gitster committed
    You no longer get this output with GIT_TRACE=1; instead, you
    can do GIT_TRACE_SETUP=1.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff @gitster

    trace: add trace_strbuf

    peff authored gitster committed
    If you happen to have a strbuf, it is a little more readable
    and a little more efficient to be able to print it directly
    instead of jamming it through the trace_printf interface.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @peff @gitster

    trace: factor out "do we want to trace" logic

    peff authored gitster committed
    As we add more tracing areas, this will avoid repeated code.
    
    Technically, trace_printf already checks this and will avoid
    printing if the trace key is not set. However, callers may
    want to find out early whether or not tracing is enabled so
    they can avoid doing work in the common non-trace case.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @peff @gitster

    trace: refactor to support multiple env variables

    peff authored gitster committed
    Right now you turn all tracing off and on with GIT_TRACE. To
    support new types of tracing without forcing the user to see
    all of them, we will soon support turning each tracing area
    on with GIT_TRACE_*.
    
    This patch lays the groundwork by providing an interface
    which does not assume GIT_TRACE. However, we still maintain
    the trace_printf interface so that existing callers do not
    need to be refactored.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @peff @gitster

    trace: add trace_vprintf

    peff authored gitster committed
    This is a necessary cleanup to adding new types of trace
    functions.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 26, 2011
  1. @peff @gitster

    strbuf: add strbuf_vaddf

    peff authored gitster committed
    In a variable-args function, the code for writing into a strbuf is
    non-trivial. We ended up cutting and pasting it in several places
    because there was no vprintf-style function for strbufs (which in turn
    was held up by a lack of va_copy).
    
    Now that we have a fallback va_copy, we can add strbuf_vaddf, the
    strbuf equivalent of vsprintf. And we can clean up the cut and paste
    mess.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Improved-by: Christian Couder <christian.couder@gmail.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.