• Pete Wyckoff's avatar
    git p4 test: translate windows paths for cygwin · cfa96496
    Pete Wyckoff authored
    Native windows binaries do not understand posix-like
    path mapping offered by cygwin.  Convert paths to native
    using "cygpath --windows" before presenting them to p4d.
    This is done using the AltRoots mechanism of p4.  Both the
    posix and windows forms are put in the client specification,
    allowing p4 to find its location by native path even though
    the environment reports a different PWD.
    Shell operations in tests will use the normal form of $cli,
    which will look like a posix path in cygwin, while p4 will
    use AltRoots to match against the windows form of the working
    This mechanism also handles the symlink issue that was fixed in
    23bd0c99 (git p4 test: use real_path to resolve p4 client
    symlinks, 2012-06-27).  Now that every p4 client view has
    an AltRoots with the real_path in it, explicitly calculating
    the real_path elsewhere is not necessary.
    Thanks-to: Sebastian Schuberth <sschuberth@gmail.com>
    Thanks-to: Johannes Sixt <j6t@kdbg.org>
    fixup! git p4 test: translate windows paths for cygwin
    Signed-off-by: default avatarPete Wyckoff <pw@padd.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
t9806-git-p4-options.sh 7.13 KB