Skip to content
  • Jonathan Nieder's avatar
    fsck: fix bogus commit header check · 0adc6a3d
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    daae1922
    
     (fsck: check ident lines in commit objects, 2010-04-24)
    taught fsck to expect commit objects to have the form
    
      tree <object name>
      <parents>
      author <valid ident string>
      committer <valid ident string>
    
      log message
    
    The check is overly strict: for example, it errors out with the
    message “expected blank line” for perfectly valid commits with an
    "encoding ISO-8859-1" line.
    
    Later it might make sense to teach fsck about the rest of the header
    and warn about unrecognized header lines, but for simplicity, let’s
    accept arbitrary trailing lines for now.
    
    Reported-by: default avatarTuncer Ayaz <tuncer.ayaz@gmail.com>
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0adc6a3d