Skip to content
  • Jeff King's avatar
    help: handle NULL value for alias.* config · 89086c94
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When showing all config with "git help --all", we print the list of
    defined aliases. But our config callback to do so does not check for a
    NULL value, meaning a config block like:
    
      [alias]
      foo
    
    will cause us to segfault. We should detect and complain about this in
    the usual way.
    
    Since this command is purely informational (and we aren't trying to run
    the alias), we could perhaps just generate a warning and continue. But
    this sort of misconfiguration should be pretty rare, and the error
    message we will produce points directly to the line of config that needs
    to be fixed. So just generating the usual error should be OK.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    89086c94