3 test_description
='Clone repositories and map users'
7 test_expect_success
'start p4d' '
11 test_expect_success
'Create a repo with different users' '
12 client_view "//depot/... //client/..." &&
18 p4 submit -d "Add file author\\n" &&
23 p4 submit -d "Add file max" &&
28 p4 submit -d "Add file moritz" &&
33 p4 submit -d "Add file nobody"
37 test_expect_success
'Clone repo root path with all history' '
38 client_view "//depot/... //client/..." &&
39 test_when_finished cleanup_git &&
43 git config --add git-p4.mapUser "mmax = Max Musterman <max@example.com> " &&
44 git config --add git-p4.mapUser " eri=Erika Musterman <erika@example.com>" &&
45 git p4 clone --use-client-spec --destination="$git" //depot@all &&
46 cat >expect <<-\EOF &&
48 Erika Musterman <erika@example.com>
49 Max Musterman <max@example.com>
50 Dr. author <author@example.com>
52 git log --format="%an <%ae>" >actual &&
53 test_cmp expect actual