Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 10, 2011
  1. jrn Junio C Hamano

    compat: helper for detecting unsigned overflow

    jrn authored gitster committed
    The idiom (a + b < a) works fine for detecting that an unsigned
    integer has overflowed, but a more explicit
    
    	unsigned_add_overflows(a, b)
    
    might be easier to read.
    
    Define such a macro, expanding roughly to ((a) < UINT_MAX - (b)).
    Because the expansion uses each argument only once outside of sizeof()
    expressions, it is safe to use with arguments that have side effects.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 10, 2010
  1. jrn Junio C Hamano

    strbuf: move strbuf_branchname to sha1_name.c

    jrn authored gitster committed
    strbuf_branchname is a thin wrapper around interpret_branch_name
    from sha1_name.o.  Most strbuf.o users do not need it.
    
    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.