Skip to content
  • Lars Schneider's avatar
    git-p4: honor core.ignorecase when using P4 client specs · a0a50d87
    Lars Schneider authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Perforce depot may record paths in mixed cases, e.g. "p4 files" may
    show that there are these two paths:
    
       //depot/Path/to/file1
       //depot/pATH/to/file2
    
    and with "p4" or "p4v", these end up in the same directory, e.g.
    
       //depot/Path/to/file1
       //depot/Path/to/file2
    
    which is the desired outcome on case insensitive systems.
    
    If git-p4 is used with client spec "//depot/Path/...", however, then
    all files not matching the case in the client spec are ignored (in
    the example above "//depot/pATH/to/file2").
    
    Fix this by using the path case that appears first in lexicographical
    order when core.ignorecase is set to true. This behavior is consistent
    with "p4" and "p4v".
    
    Signed-off-by: default avatarLars Schneider <larsxschneider@gmail.com>
    Acked-by: default avatarLuke Diamand <luke@diamand.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    a0a50d87