Skip to content
  • Jeff King's avatar
    config: make numeric parsing errors more clear · 2f666581
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    If we try to parse an integer config argument and get a
    number outside of the representable range, we die with the
    cryptic message: "bad config value for '%s'".
    
    We can improve two things:
    
      1. Show the value that produced the error (e.g., bad
         config value '3g' for 'foo.bar').
    
      2. Mention the reason the value was rejected (e.g.,
         "invalid unit" versus "out of range").
    
    A few tests need to be updated with the new output, but that
    should not be representative of real-world breakage, as
    scripts should not be depending on the exact text of our
    stderr output, which is subject to i18n anyway.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    2f666581