Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t9828-git-p4-map-user.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t9828-git-p4-map-user.sh` 57 lines ยท 1251 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='Clone repositories and map users' 4 5 . ./lib-git-p4.sh 6 7 test_expect_success 'start p4d' ' 8 start_p4d 9 ' 10 11 test_expect_success 'Create a repo with different users' ' 12 client_view "//depot/... //client/..." && 13 ( 14 cd "$cli" && 15 16 >author.txt && 17 p4 add author.txt && 18 p4 submit -d "Add file author\\n" && 19 20 P4USER=mmax && 21 >max.txt && 22 p4 add max.txt && 23 p4 submit -d "Add file max" && 24 25 P4USER=eri && 26 >moritz.txt && 27 p4 add moritz.txt && 28 p4 submit -d "Add file moritz" && 29 30 P4USER=no && 31 >nobody.txt && 32 p4 add nobody.txt && 33 p4 submit -d "Add file nobody" 34 ) 35 ' 36 37 test_expect_success 'Clone repo root path with all history' ' 38 client_view "//depot/... //client/..." && 39 test_when_finished cleanup_git && 40 ( 41 cd "$git" && 42 git init . && 43 git config --add git-p4.mapUser "mmax = Max Musterman " && 44 git config --add git-p4.mapUser " eri=Erika Musterman " && 45 git p4 clone --use-client-spec --destination="$git" //depot@all && 46 cat >expect <<-\EOF && 47 no 48 Erika Musterman 49 Max Musterman 50 Dr. author 51 EOF 52 git log --format="%an <%ae>" >actual && 53 test_cmp expect actual 54 ) 55 ' 56 57 test_done