Skip to content
  • Vitor Antunes's avatar
    git-p4: improve client path detection when branches are used · cd884106
    Vitor Antunes authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Perforce allows client side file/directory remapping through
    the use of the client view definition that is part of the
    user's client spec.
    
    To support this functionality while branch detection is
    enabled it is important to determine the branch location in
    the workspace such that the correct files are patched before
    Perforce submission. Perforce provides a command that
    facilitates this process: p4 where.
    
    This patch does two things to fix improve file location
    detection when git-p4 has branch detection and use of client
    spec enabled:
    
     1. Enable usage of "p4 where" when Perforce branches exist
        in the git repository, even when client specification is
        used. This makes use of the already existing function
        p4Where.
    
     2. Allow identifying partial matches of the branch's depot
        path while processing the output of "p4 where". For
        robustness, paths will only match if ending in "/...".
    
    Signed-off-by: default avatarVitor Antunes <vitor.hda@gmail.com>
    Acked-by: default avatarLuke Diamand <luke@diamand.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    cd884106