{"thread":{"id":"41577","subject":"[PATCH v2] git-p4: map a P4 user to Git author name and email address","startedAt":"2016-03-01T10:49:56Z","lastAt":"2016-03-15T18:37:41Z","messageCount":9,"participants":["larsxschneider@gmail.com","Lars Schneider","Eric Sunshine","Luke Diamand","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"279946","messageId":"1456829396-38659-1-git-send-email-larsxschneider@gmail.com","threadId":"41577","inReplyTo":null,"subject":"[PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-03-01T10:49:56Z","receivedAt":"2016-03-01T10:49:56Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <lars.schneider@autodesk.com>\n\nMap a P4 user to a specific name and email address in Git with the\n\"git-p4.mapUser\" config. The config value must be a string adhering\nto the format \"p4user = First Lastname <email@address.com>\".\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n\ndiff to v1:\n\n* use '=' instead of '->' to mimic SVN user mapping format (thanks Eric)\n* fix ASCII doc formatting (thanks Eric)\n* fix broken && chain in test (thanks Eric)\n* use more innocuous names for test users (thanks Luke and Torsten)\n* make regex accept more blank characters\n\nCheers,\nLars\n\n\n Documentation/git-p4.txt   | 11 +++++++++\n git-p4.py                  |  9 +++++++\n t/t9828-git-p4-map-user.sh | 61 ++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 81 insertions(+)\n create mode 100755 t/t9828-git-p4-map-user.sh\n\ndiff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\nindex 738cfde..9f077fd 100644\n--- a/Documentation/git-p4.txt\n+++ b/Documentation/git-p4.txt\n@@ -553,6 +553,17 @@ git-p4.keepEmptyCommits::\n \tA changelist that contains only excluded files will be imported\n \tas an empty commit if this boolean option is set to true.\n\n+git-p4.mapUser::\n+\tMap a P4 user to a name and email address in Git. Use a string\n+\twith the following format to create a mapping:\n++\n+-------------\n+git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n+-------------\n++\n+A mapping will override any user information from P4. Mappings for\n+multiple P4 user can be defined.\n+\n Submit variables\n ~~~~~~~~~~~~~~~~\n git-p4.detectRenames::\ndiff --git a/git-p4.py b/git-p4.py\nindex c33dece..bac341d 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -1160,6 +1160,15 @@ class P4UserMap:\n             self.users[output[\"User\"]] = output[\"FullName\"] + \" <\" + output[\"Email\"] + \">\"\n             self.emails[output[\"Email\"]] = output[\"User\"]\n\n+        mapUserConfigRegex = re.compile(r\"^\\s*(\\S+)\\s*=\\s*(.+)\\s*<(\\S+)>\\s*$\", re.VERBOSE)\n+        for mapUserConfig in gitConfigList(\"git-p4.mapUser\"):\n+            mapUser = mapUserConfigRegex.findall(mapUserConfig)\n+            if mapUser and len(mapUser[0]) == 3:\n+                user = mapUser[0][0]\n+                fullname = mapUser[0][1]\n+                email = mapUser[0][2]\n+                self.users[user] = fullname + \" <\" + email + \">\"\n+                self.emails[email] = user\n\n         s = ''\n         for (key, val) in self.users.items():\ndiff --git a/t/t9828-git-p4-map-user.sh b/t/t9828-git-p4-map-user.sh\nnew file mode 100755\nindex 0000000..e20395c\n--- /dev/null\n+++ b/t/t9828-git-p4-map-user.sh\n@@ -0,0 +1,61 @@\n+#!/bin/sh\n+\n+test_description='Clone repositories and map users'\n+\n+. ./lib-git-p4.sh\n+\n+test_expect_success 'start p4d' '\n+\tstart_p4d\n+'\n+\n+test_expect_success 'Create a repo with different users' '\n+\tclient_view \"//depot/... //client/...\" &&\n+\t(\n+\t\tcd \"$cli\" &&\n+\n+\t\t>author.txt &&\n+\t\tp4 add author.txt &&\n+\t\tp4 submit -d \"Add file author\\\\n\" &&\n+\n+\t\tP4USER=mmax &&\n+\t\t>max.txt &&\n+\t\tp4 add max.txt &&\n+\t\tp4 submit -d \"Add file max\" &&\n+\n+\t\tP4USER=eri &&\n+\t\t>moritz.txt &&\n+\t\tp4 add moritz.txt &&\n+\t\tp4 submit -d \"Add file moritz\" &&\n+\n+\t\tP4USER=no &&\n+\t\t>nobody.txt &&\n+\t\tp4 add nobody.txt &&\n+\t\tp4 submit -d \"Add file nobody\"\n+\t)\n+'\n+\n+test_expect_success 'Clone repo root path with all history' '\n+\tclient_view \"//depot/... //client/...\" &&\n+\ttest_when_finished cleanup_git &&\n+\t(\n+\t\tcd \"$git\" &&\n+\t\tgit init . &&\n+\t\tgit config --add git-p4.mapUser \"mmax = Max Musterman   <max@example.com> \"  &&\n+\t\tgit config --add git-p4.mapUser \"  eri=Erika Musterman <erika@example.com>\" &&\n+\t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot@all &&\n+\t\tcat >expect <<-\\EOF &&\n+\t\t\tno <no@client>\n+\t\t\tErika Musterman <erika@example.com>\n+\t\t\tMax Musterman <max@example.com>\n+\t\t\tDr. author <author@example.com>\n+\t\tEOF\n+\t\tgit log --format=\"%an <%ae>\" >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'kill p4d' '\n+\tkill_p4d\n+'\n+\n+test_done\n--\n2.5.1\n"},{"id":"279947","messageId":"71F1F742-5641-443A-9110-DCAA3CE80C00@gmail.com","threadId":"41577","inReplyTo":"1456829396-38659-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-03-01T10:57:12Z","receivedAt":"2016-03-01T10:57:12Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 01 Mar 2016, at 11:49, larsxschneider@gmail.com wrote:\n\n> From: Lars Schneider <lars.schneider@autodesk.com>\noops ... this should be \"larsxschneider@gmail.com\"... sorry\n\n- Lars\n\n> \n> Map a P4 user to a specific name and email address in Git with the\n> \"git-p4.mapUser\" config. The config value must be a string adhering\n> to the format \"p4user = First Lastname <email@address.com>\".\n> \n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n> \n> diff to v1:\n> \n> * use '=' instead of '->' to mimic SVN user mapping format (thanks Eric)\n> * fix ASCII doc formatting (thanks Eric)\n> * fix broken && chain in test (thanks Eric)\n> * use more innocuous names for test users (thanks Luke and Torsten)\n> * make regex accept more blank characters\n> \n> Cheers,\n> Lars\n> \n> \n> Documentation/git-p4.txt   | 11 +++++++++\n> git-p4.py                  |  9 +++++++\n> t/t9828-git-p4-map-user.sh | 61 ++++++++++++++++++++++++++++++++++++++++++++++\n> 3 files changed, 81 insertions(+)\n> create mode 100755 t/t9828-git-p4-map-user.sh\n> \n> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n> index 738cfde..9f077fd 100644\n> --- a/Documentation/git-p4.txt\n> +++ b/Documentation/git-p4.txt\n> @@ -553,6 +553,17 @@ git-p4.keepEmptyCommits::\n> \tA changelist that contains only excluded files will be imported\n> \tas an empty commit if this boolean option is set to true.\n> \n> +git-p4.mapUser::\n> +\tMap a P4 user to a name and email address in Git. Use a string\n> +\twith the following format to create a mapping:\n> ++\n> +-------------\n> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n> +-------------\n> ++\n> +A mapping will override any user information from P4. Mappings for\n> +multiple P4 user can be defined.\n> +\n> Submit variables\n> ~~~~~~~~~~~~~~~~\n> git-p4.detectRenames::\n> diff --git a/git-p4.py b/git-p4.py\n> index c33dece..bac341d 100755\n> --- a/git-p4.py\n> +++ b/git-p4.py\n> @@ -1160,6 +1160,15 @@ class P4UserMap:\n>             self.users[output[\"User\"]] = output[\"FullName\"] + \" <\" + output[\"Email\"] + \">\"\n>             self.emails[output[\"Email\"]] = output[\"User\"]\n> \n> +        mapUserConfigRegex = re.compile(r\"^\\s*(\\S+)\\s*=\\s*(.+)\\s*<(\\S+)>\\s*$\", re.VERBOSE)\n> +        for mapUserConfig in gitConfigList(\"git-p4.mapUser\"):\n> +            mapUser = mapUserConfigRegex.findall(mapUserConfig)\n> +            if mapUser and len(mapUser[0]) == 3:\n> +                user = mapUser[0][0]\n> +                fullname = mapUser[0][1]\n> +                email = mapUser[0][2]\n> +                self.users[user] = fullname + \" <\" + email + \">\"\n> +                self.emails[email] = user\n> \n>         s = ''\n>         for (key, val) in self.users.items():\n> diff --git a/t/t9828-git-p4-map-user.sh b/t/t9828-git-p4-map-user.sh\n> new file mode 100755\n> index 0000000..e20395c\n> --- /dev/null\n> +++ b/t/t9828-git-p4-map-user.sh\n> @@ -0,0 +1,61 @@\n> +#!/bin/sh\n> +\n> +test_description='Clone repositories and map users'\n> +\n> +. ./lib-git-p4.sh\n> +\n> +test_expect_success 'start p4d' '\n> +\tstart_p4d\n> +'\n> +\n> +test_expect_success 'Create a repo with different users' '\n> +\tclient_view \"//depot/... //client/...\" &&\n> +\t(\n> +\t\tcd \"$cli\" &&\n> +\n> +\t\t>author.txt &&\n> +\t\tp4 add author.txt &&\n> +\t\tp4 submit -d \"Add file author\\\\n\" &&\n> +\n> +\t\tP4USER=mmax &&\n> +\t\t>max.txt &&\n> +\t\tp4 add max.txt &&\n> +\t\tp4 submit -d \"Add file max\" &&\n> +\n> +\t\tP4USER=eri &&\n> +\t\t>moritz.txt &&\n> +\t\tp4 add moritz.txt &&\n> +\t\tp4 submit -d \"Add file moritz\" &&\n> +\n> +\t\tP4USER=no &&\n> +\t\t>nobody.txt &&\n> +\t\tp4 add nobody.txt &&\n> +\t\tp4 submit -d \"Add file nobody\"\n> +\t)\n> +'\n> +\n> +test_expect_success 'Clone repo root path with all history' '\n> +\tclient_view \"//depot/... //client/...\" &&\n> +\ttest_when_finished cleanup_git &&\n> +\t(\n> +\t\tcd \"$git\" &&\n> +\t\tgit init . &&\n> +\t\tgit config --add git-p4.mapUser \"mmax = Max Musterman   <max@example.com> \"  &&\n> +\t\tgit config --add git-p4.mapUser \"  eri=Erika Musterman <erika@example.com>\" &&\n> +\t\tgit p4 clone --use-client-spec --destination=\"$git\" //depot@all &&\n> +\t\tcat >expect <<-\\EOF &&\n> +\t\t\tno <no@client>\n> +\t\t\tErika Musterman <erika@example.com>\n> +\t\t\tMax Musterman <max@example.com>\n> +\t\t\tDr. author <author@example.com>\n> +\t\tEOF\n> +\t\tgit log --format=\"%an <%ae>\" >actual &&\n> +\t\ttest_cmp expect actual\n> +\t)\n> +'\n> +\n> +test_expect_success 'kill p4d' '\n> +\tkill_p4d\n> +'\n> +\n> +test_done\n> --\n> 2.5.1\n> \n"},{"id":"279994","messageId":"CAPig+cRwEKjGaDA-jy8KJSAhTheJYDmxtPq8SdVs0LA2f9-9Yw@mail.gmail.com","threadId":"41577","inReplyTo":"1456829396-38659-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-03-01T19:15:57Z","receivedAt":"2016-03-01T19:15:57Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:\n> Map a P4 user to a specific name and email address in Git with the\n> \"git-p4.mapUser\" config. The config value must be a string adhering\n> to the format \"p4user = First Lastname <email@address.com>\".\n>\n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n> +git-p4.mapUser::\n> +       Map a P4 user to a name and email address in Git. Use a string\n> +       with the following format to create a mapping:\n> ++\n> +-------------\n> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n> +-------------\n> ++\n> +A mapping will override any user information from P4. Mappings for\n> +multiple P4 user can be defined.\n\nSorry for not paying closer attention the first time, but this needs\nto be repeated for each P4 user you want to map, right? One can\nimagine this quickly becoming painful if you have a lot of users to\nmap. Have you considered modeling this after git-svn where you can set\nan \"authors\" file (and name the corresponding option --authors-file)?\n"},{"id":"280034","messageId":"CAE5ih7_EAjMtdNQ6ab2wrN4LMSBBZ=T7w-fPKLtdRqfvFUhzFQ@mail.gmail.com","threadId":"41577","inReplyTo":"CAPig+cRwEKjGaDA-jy8KJSAhTheJYDmxtPq8SdVs0LA2f9-9Yw@mail.gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2016-03-02T05:06:31Z","receivedAt":"2016-03-02T05:06:31Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 1 March 2016 at 19:15, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:\n>> Map a P4 user to a specific name and email address in Git with the\n>> \"git-p4.mapUser\" config. The config value must be a string adhering\n>> to the format \"p4user = First Lastname <email@address.com>\".\n>>\n>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>> ---\n>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n>> +git-p4.mapUser::\n>> +       Map a P4 user to a name and email address in Git. Use a string\n>> +       with the following format to create a mapping:\n>> ++\n>> +-------------\n>> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n>> +-------------\n>> ++\n>> +A mapping will override any user information from P4. Mappings for\n>> +multiple P4 user can be defined.\n>\n> Sorry for not paying closer attention the first time, but this needs\n> to be repeated for each P4 user you want to map, right? One can\n> imagine this quickly becoming painful if you have a lot of users to\n> map. Have you considered modeling this after git-svn where you can set\n> an \"authors\" file (and name the corresponding option --authors-file)?\n\nFor most authors it should just use the existing Perforce user\ninformation. This is (I assume) just for the occasional exception\nwhere Perforce has the wrong email address.\n\nLuke\n"},{"id":"280055","messageId":"61210CAD-D3D2-40AC-88F9-02169619F5F6@gmail.com","threadId":"41577","inReplyTo":"CAE5ih7_EAjMtdNQ6ab2wrN4LMSBBZ=T7w-fPKLtdRqfvFUhzFQ@mail.gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-03-02T09:25:25Z","receivedAt":"2016-03-02T09:25:25Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 02 Mar 2016, at 06:06, Luke Diamand <luke@diamand.org> wrote:\n> \n> On 1 March 2016 at 19:15, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>> On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:\n>>> Map a P4 user to a specific name and email address in Git with the\n>>> \"git-p4.mapUser\" config. The config value must be a string adhering\n>>> to the format \"p4user = First Lastname <email@address.com>\".\n>>> \n>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>>> ---\n>>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n>>> +git-p4.mapUser::\n>>> +       Map a P4 user to a name and email address in Git. Use a string\n>>> +       with the following format to create a mapping:\n>>> ++\n>>> +-------------\n>>> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n>>> +-------------\n>>> ++\n>>> +A mapping will override any user information from P4. Mappings for\n>>> +multiple P4 user can be defined.\n>> \n>> Sorry for not paying closer attention the first time, but this needs\n>> to be repeated for each P4 user you want to map, right? One can\n>> imagine this quickly becoming painful if you have a lot of users to\n>> map. Have you considered modeling this after git-svn where you can set\n>> an \"authors\" file (and name the corresponding option --authors-file)?\n> \n> For most authors it should just use the existing Perforce user\n> information. This is (I assume) just for the occasional exception\n> where Perforce has the wrong email address.\nI agree this is an occasional exception. I use it for users that have been deleted on the Perforce server.\n\n@Eric: If a user wants to they could create a custom gitconfig and then use the config \"include\" mechanism to achieve a \"authors\" file kind of approach.\n\nCheers,\nLars"},{"id":"280686","messageId":"CB4CAAEA-0036-483A-9F2C-89B95E04037E@gmail.com","threadId":"41577","inReplyTo":"61210CAD-D3D2-40AC-88F9-02169619F5F6@gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-03-13T17:41:35Z","receivedAt":"2016-03-13T17:41:35Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 02 Mar 2016, at 10:25, Lars Schneider <larsxschneider@gmail.com> wrote:\n\n> \n>> On 02 Mar 2016, at 06:06, Luke Diamand <luke@diamand.org> wrote:\n>> \n>> On 1 March 2016 at 19:15, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>>> On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:\n>>>> Map a P4 user to a specific name and email address in Git with the\n>>>> \"git-p4.mapUser\" config. The config value must be a string adhering\n>>>> to the format \"p4user = First Lastname <email@address.com>\".\n>>>> \n>>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>>>> ---\n>>>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n>>>> +git-p4.mapUser::\n>>>> +       Map a P4 user to a name and email address in Git. Use a string\n>>>> +       with the following format to create a mapping:\n>>>> ++\n>>>> +-------------\n>>>> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n>>>> +-------------\n>>>> ++\n>>>> +A mapping will override any user information from P4. Mappings for\n>>>> +multiple P4 user can be defined.\n>>> \n>>> Sorry for not paying closer attention the first time, but this needs\n>>> to be repeated for each P4 user you want to map, right? One can\n>>> imagine this quickly becoming painful if you have a lot of users to\n>>> map. Have you considered modeling this after git-svn where you can set\n>>> an \"authors\" file (and name the corresponding option --authors-file)?\n>> \n>> For most authors it should just use the existing Perforce user\n>> information. This is (I assume) just for the occasional exception\n>> where Perforce has the wrong email address.\n> I agree this is an occasional exception. I use it for users that have been deleted on the Perforce server.\n> \n> @Eric: If a user wants to they could create a custom gitconfig and then use the config \"include\" mechanism to achieve a \"authors\" file kind of approach.\n> \n\nIs the patch uninteresting for git-p4 as it handles only an occasional\nexception or did the patch get lost in the noise? :-)\n\nThanks,\nLars\n"},{"id":"280766","messageId":"CAE5ih79aKHM5yim-U_sauZ7ChgWR82CAre4EC3j5HQ8CCG=w_Q@mail.gmail.com","threadId":"41577","inReplyTo":"CB4CAAEA-0036-483A-9F2C-89B95E04037E@gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2016-03-15T07:19:12Z","receivedAt":"2016-03-15T07:19:12Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 13 March 2016 at 17:41, Lars Schneider <larsxschneider@gmail.com> wrote:\n>\n> On 02 Mar 2016, at 10:25, Lars Schneider <larsxschneider@gmail.com> wrote:\n>\n>>\n>>> On 02 Mar 2016, at 06:06, Luke Diamand <luke@diamand.org> wrote:\n>>>\n>>> On 1 March 2016 at 19:15, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>>>> On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:\n>>>>> Map a P4 user to a specific name and email address in Git with the\n>>>>> \"git-p4.mapUser\" config. The config value must be a string adhering\n>>>>> to the format \"p4user = First Lastname <email@address.com>\".\n>>>>>\n>>>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>>>>> ---\n>>>>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n>>>>> +git-p4.mapUser::\n>>>>> +       Map a P4 user to a name and email address in Git. Use a string\n>>>>> +       with the following format to create a mapping:\n>>>>> ++\n>>>>> +-------------\n>>>>> +git config --add git-p4.mapUser \"p4user = First Last <mail@address.com>\"\n>>>>> +-------------\n>>>>> ++\n>>>>> +A mapping will override any user information from P4. Mappings for\n>>>>> +multiple P4 user can be defined.\n>>>>\n>>>> Sorry for not paying closer attention the first time, but this needs\n>>>> to be repeated for each P4 user you want to map, right? One can\n>>>> imagine this quickly becoming painful if you have a lot of users to\n>>>> map. Have you considered modeling this after git-svn where you can set\n>>>> an \"authors\" file (and name the corresponding option --authors-file)?\n>>>\n>>> For most authors it should just use the existing Perforce user\n>>> information. This is (I assume) just for the occasional exception\n>>> where Perforce has the wrong email address.\n>> I agree this is an occasional exception. I use it for users that have been deleted on the Perforce server.\n>>\n>> @Eric: If a user wants to they could create a custom gitconfig and then use the config \"include\" mechanism to achieve a \"authors\" file kind of approach.\n>>\n>\n> Is the patch uninteresting for git-p4 as it handles only an occasional\n> exception or did the patch get lost in the noise? :-)\n\nI thought it was useful; I hadn't realised that it was needed for deleted users.\n\nLuke\n"},{"id":"280808","messageId":"xmqqbn6f8yzb.fsf@gitster.mtv.corp.google.com","threadId":"41577","inReplyTo":"CAE5ih79aKHM5yim-U_sauZ7ChgWR82CAre4EC3j5HQ8CCG=w_Q@mail.gmail.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-15T16:52:56Z","receivedAt":"2016-03-15T16:52:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n>> Is the patch uninteresting for git-p4 as it handles only an occasional\n>> exception or did the patch get lost in the noise? :-)\n>\n> I thought it was useful; I hadn't realised that it was needed for deleted users.\n>\n> Luke\n\nSo..., should I just pick it up and queue with your Reviewed-by:?\n\nThanks.\n"},{"id":"280816","messageId":"CAE5ih78VL2CFsLGtjfx_yUXBWSx8VvDB-Gv5NjjsJMq=PQSUhQ@mail.gmail.com","threadId":"41577","inReplyTo":"xmqqbn6f8yzb.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2016-03-15T18:37:41Z","receivedAt":"2016-03-15T18:37:41Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"Yes please.\n\n\nOn 15 March 2016 at 16:52, Junio C Hamano <gitster@pobox.com> wrote:\n> Luke Diamand <luke@diamand.org> writes:\n>\n>>> Is the patch uninteresting for git-p4 as it handles only an occasional\n>>> exception or did the patch get lost in the noise? :-)\n>>\n>> I thought it was useful; I hadn't realised that it was needed for deleted users.\n>>\n>> Luke\n>\n> So..., should I just pick it up and queue with your Reviewed-by:?\n>\n> Thanks.\n"}]}