git p4: make branch detection work with --use-client-spec
commit21ef5df4315b8f4f45bffb6af54d1ea338cb2cf5
authorPete Wyckoff <pw@padd.com>
Sat, 11 Aug 2012 16:55:04 +0000 (11 12:55 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Aug 2012 22:52:48 +0000 (20 15:52 -0700)
tree1761a6cd66bd60c81c8007a73c5f1dbe38bcc377
parent0d1696ef47a61bba1088b0e5cd58a8bc45d936fb
git p4: make branch detection work with --use-client-spec

The bug report in http://stackoverflow.com/questions/11893688
observes that files are mapped into the wrong locations in
git when both --use-client-spec and --branch-detection are enabled.

Fix this by changing the relative path prefix to match discovered
branches when using a client spec.

The problem was likely introduced with ecb7cf9 (git-p4: rewrite view
handling, 2012-01-02).

Signed-off-by: Pete Wyckoff <pw@padd.com>
Tested-by: Matthew Korich <matthew@korich.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py
t/t9801-git-p4-branch.sh