Skip to content
  • Jeff King's avatar
    userdiff: drop parse_driver function · 0a5987fe
    Jeff King authored
    
    
    When we parse userdiff config, we generally assume that
    
      diff.name.key
    
    will affect the "key" value of the "name" driver. However,
    without confirming that the key is a valid userdiff key, we
    may accidentally conflict with the ancient "diff.color.*"
    namespace. The current code is careful not to even create a
    driver struct if we do not see a key that is known by the
    diff-driver code.
    
    However, this carefulness is unnecessary; the default driver
    with no keys set behaves exactly the same as having no
    driver at all. We can simply set up the driver struct as
    soon as we see we have a config key that looks like a
    driver. This makes the code a bit more readable.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Reviewed-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0a5987fe