git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] git-p4: map a P4 user to Git author name and email address

From
Luke Diamand <luke@diamand.org>
Date
Mar 15, 2016, 07:19 UTC
Message-ID
<CAE5ih79aKHM5yim-U_sauZ7ChgWR82CAre4EC3j5HQ8CCG=w_Q@mail.gmail.com>
In-Reply-To
<CB4CAAEA-0036-483A-9F2C-89B95E04037E@gmail.com>
On 13 March 2016 at 17:41, Lars Schneider <larsxschneider@gmail.com> wrote:
Show 42 quoted lines
>
> On 02 Mar 2016, at 10:25, Lars Schneider <larsxschneider@gmail.com> wrote:
>
>>
>>> On 02 Mar 2016, at 06:06, Luke Diamand <luke@diamand.org> wrote:
>>>
>>> On 1 March 2016 at 19:15, Eric Sunshine <sunshine@sunshineco.com> wrote:
>>>> On Tue, Mar 1, 2016 at 5:49 AM,  <larsxschneider@gmail.com> wrote:
>>>>> Map a P4 user to a specific name and email address in Git with the
>>>>> "git-p4.mapUser" config. The config value must be a string adhering
>>>>> to the format "p4user = First Lastname <email@address.com>".
>>>>>
>>>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>>>>> ---
>>>>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
>>>>> +git-p4.mapUser::
>>>>> +       Map a P4 user to a name and email address in Git. Use a string
>>>>> +       with the following format to create a mapping:
>>>>> ++
>>>>> +-------------
>>>>> +git config --add git-p4.mapUser "p4user = First Last <mail@address.com>"
>>>>> +-------------
>>>>> ++
>>>>> +A mapping will override any user information from P4. Mappings for
>>>>> +multiple P4 user can be defined.
>>>>
>>>> Sorry for not paying closer attention the first time, but this needs
>>>> to be repeated for each P4 user you want to map, right? One can
>>>> imagine this quickly becoming painful if you have a lot of users to
>>>> map. Have you considered modeling this after git-svn where you can set
>>>> an "authors" file (and name the corresponding option --authors-file)?
>>>
>>> For most authors it should just use the existing Perforce user
>>> information. This is (I assume) just for the occasional exception
>>> where Perforce has the wrong email address.
>> I agree this is an occasional exception. I use it for users that have been deleted on the Perforce server.
>>
>> @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.
>>
>
> Is the patch uninteresting for git-p4 as it handles only an occasional
> exception or did the patch get lost in the noise? :-)
I thought it was useful; I hadn't realised that it was needed for deleted users.
Luke
Previous: Lars SchneiderNext: Junio C Hamano
Message 7 of 9 in “git-p4: map a P4 user to Git author name and email address”
  1. git-p4: map a P4 user to Git author name and email addresslarsxschneider@gmail.com, Mar 1, 2016
  2. Lars SchneiderMar 1, 2016
  3. Eric SunshineMar 1, 2016
  4. Luke DiamandMar 2, 2016
  5. Lars SchneiderMar 2, 2016
  6. Lars SchneiderMar 13, 2016
  7. Luke DiamandMar 15, 2016
  8. Junio C HamanoMar 15, 2016
  9. Luke DiamandMar 15, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.