Skip to content
  • Jeff King's avatar
    CodingGuidelines: mention "static" and "extern" · 89a9f2c8
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    It perhaps goes without saying that file-local stuff should
    be marked static, but it does not hurt to remind people.
    
    Less obvious is that we are settling on "do not include
    extern in function declarations". It is already the default
    unless the function was previously declared static (but if
    you are following a static declaration with an unmarked one,
    you should think about why you are declaring the thing
    twice). And so it just becomes an extra noise-word in our
    header files.
    
    We used to give the opposite advice, so there are quite a
    few "extern" markers in early Git code. But this at least
    makes a concrete suggestion that we can follow going
    forward.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    89a9f2c8