Skip to content
  • Jeff King's avatar
    give "nbuf" strbuf a more meaningful name · 0d4cc1b4
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    It's a common pattern in our code to read paths from stdin,
    separated either by newlines or NULs, and unquote as
    necessary. In each of these five cases we use "nbuf" to
    temporarily store the unquoted value. Let's give it the more
    meaningful name "unquoted", which makes it easier to
    understand the purpose of the variable.
    
    While we're at it, let's also static-initialize all of our
    strbufs. It's not wrong to call strbuf_init, but it
    increases the cognitive load on the reader, who might wonder
    "do we sometimes avoid initializing them?  why?".
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0d4cc1b4