| test_description='Clone repositories and map users' |
| test_expect_success 'start p4d' ' |
| test_expect_success 'Create a repo with different users' ' |
| client_view "//depot/... //client/..." && |
| p4 submit -d "Add file author\\n" && |
| p4 submit -d "Add file max" && |
| p4 submit -d "Add file moritz" && |
| p4 submit -d "Add file nobody" |
| test_expect_success 'Clone repo root path with all history' ' |
| client_view "//depot/... //client/..." && |
| test_when_finished cleanup_git && |
| git config --add git-p4.mapUser "mmax = Max Musterman <max@example.com> " && |
| git config --add git-p4.mapUser " eri=Erika Musterman <erika@example.com>" && |
| git p4 clone --use-client-spec --destination="$git" //depot@all && |
| Erika Musterman <erika@example.com> |
| Max Musterman <max@example.com> |
| Dr. author <author@example.com> |
| git log --format="%an <%ae>" >actual && |