Skip to content
  • Jeff King's avatar
    create_branch: use xstrfmt for reflog message · cddac452
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We generate a reflog message that contains some fixed text
    plus a branch name, and use a buffer of size PATH_MAX + 20.
    This mostly works if you assume that refnames are shorter
    than PATH_MAX, but:
    
      1. That's not necessarily true. PATH_MAX is not always the
         filesystem's limit.
    
      2. The "20" is not sufficiently large for the fixed text
         anyway.
    
    Let's just switch to a heap buffer so we don't have to even
    care.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    cddac452