Skip to content
  • Jeff King's avatar
    config: die when --blob is used outside a repository · 17b8a2d6
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    If you run "config --blob" outside of a repository, then we
    eventually try to resolve the blob name and hit a BUG().
    Let's catch this earlier and provide a useful message.
    
    Note that we could also catch this much lower in the stack,
    in git_config_from_blob_ref(). That might cover other
    callsites, too, but it's unclear whether those ones would
    actually be bugs or not. So let's leave the low-level
    functions to assume the caller knows what it's doing (and
    BUG() if it turns out it doesn't).
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    17b8a2d6