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>
This commit is contained in:
Pete Wyckoff
2012-08-11 12:55:04 -04:00
committed by Junio C Hamano
parent 0d1696ef47
commit 21ef5df431
2 changed files with 32 additions and 7 deletions

View File

@ -438,7 +438,7 @@ test_expect_success 'use-client-spec detect-branches setup' '
)
'
test_expect_failure 'use-client-spec detect-branches files in top-level' '
test_expect_success 'use-client-spec detect-branches files in top-level' '
test_when_finished cleanup_git &&
test_create_repo "$git" &&
(