Skip to content
  • Jeff King's avatar
    alternates: use fspathcmp to detect duplicates · ea0fc3b4
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    On a case-insensitive filesystem, we should realize that
    "a/objects" and "A/objects" are the same path. We already
    use fspathcmp() to check against the main object directory,
    but until recently we couldn't use it for comparing against
    other alternates (because their paths were not
    NUL-terminated strings). But now we can, so let's do so.
    
    Note that we also need to adjust count-objects to load the
    config, so that it can see the setting of core.ignorecase
    (this is required by the test, but is also a general bugfix
    for users of count-objects).
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    ea0fc3b4