{"thread":{"id":"32586","subject":"Suggestion: add option in git-p4 to preserve user in Git repository","startedAt":"2013-01-11T03:38:08Z","lastAt":"2013-06-17T16:23:10Z","messageCount":6,"participants":["Olivier Delalleau","Pete Wyckoff","Deirdre Connolly"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"206487","messageId":"CAFXk4bpQo26sAfHkE5_VLi_UkZcgsYvwYNH8byZjuXs=EAhu+A@mail.gmail.com","threadId":"32586","inReplyTo":null,"subject":"Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Olivier Delalleau","fromEmail":"shish@keba.be","sentAt":"2013-01-11T03:38:08Z","receivedAt":"2013-01-11T03:38:08Z","isPatch":false,"sender":{"key":"shish@keba.be","avatar":null},"body":"Hi,\n\nI'm in a situation where I don't have P4 admin rights to use the\n--preserve-user option of git-p4. However, I would like to keep user\ninformation in the associated Git branch.\n\nWould it be possible to add an option for this?\n\nThanks,\n\n-=- Olivier\n"},{"id":"206610","messageId":"20130112163838.GA28722@padd.com","threadId":"32586","inReplyTo":"CAFXk4bpQo26sAfHkE5_VLi_UkZcgsYvwYNH8byZjuXs=EAhu+A@mail.gmail.com","subject":"Re: Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2013-01-12T16:38:38Z","receivedAt":"2013-01-12T16:38:38Z","isPatch":false,"sender":{"key":"pw@padd.com","avatar":null},"body":"shish@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:\n> I'm in a situation where I don't have P4 admin rights to use the\n> --preserve-user option of git-p4. However, I would like to keep user\n> information in the associated Git branch.\n> \n> Would it be possible to add an option for this?\n\nThe --preserve-user option is used to submit somebody else's work\nfrom git to p4.  It does \"p4 change -f\" to edit the author of the\nchange after it has been submitted to p4.  P4 requires admin\nprivileges to do that.\n\nChanges that are imported _from_ p4 to git do have the correct\nauthor information.\n\nCan you explain a bit more what you're looking for?\n\n\t\t-- Pete\n"},{"id":"206624","messageId":"CAFXk4bpM8X3k=iwRjM9kvm4XbZyKS+hTCiVbHOjH3jK6MkkBSg@mail.gmail.com","threadId":"32586","inReplyTo":"20130112163838.GA28722@padd.com","subject":"Re: Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Olivier Delalleau","fromEmail":"shish@keba.be","sentAt":"2013-01-12T19:44:49Z","receivedAt":"2013-01-12T19:44:49Z","isPatch":false,"sender":{"key":"shish@keba.be","avatar":null},"body":"2013/1/12 Pete Wyckoff <pw@padd.com>:\n> shish@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:\n>> I'm in a situation where I don't have P4 admin rights to use the\n>> --preserve-user option of git-p4. However, I would like to keep user\n>> information in the associated Git branch.\n>>\n>> Would it be possible to add an option for this?\n>\n> The --preserve-user option is used to submit somebody else's work\n> from git to p4.  It does \"p4 change -f\" to edit the author of the\n> change after it has been submitted to p4.  P4 requires admin\n> privileges to do that.\n>\n> Changes that are imported _from_ p4 to git do have the correct\n> author information.\n>\n> Can you explain a bit more what you're looking for?\n>\n>                 -- Pete\n\nHi,\n\nSorry I wasn't clear enough. When \"git p4 submit\" submits changes from\nGit to P4, it also edits the Git history and replaces the Git commits'\nauthors by the information from the Perforce account submitting the\nchanges. The advantage is that both the P4 and Git repositories share\nthe same author information, but in my case I would like to keep in\nthe Git repository the original authors (because the P4 account I'm\nusing to submit to P4 is shared by all Git users).\n\nHope it makes more sense now :)\n\n-=- Olivier\n"},{"id":"206627","messageId":"20130112225640.GA23079@padd.com","threadId":"32586","inReplyTo":"CAFXk4bpM8X3k=iwRjM9kvm4XbZyKS+hTCiVbHOjH3jK6MkkBSg@mail.gmail.com","subject":"Re: Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2013-01-12T22:56:40Z","receivedAt":"2013-01-12T22:56:40Z","isPatch":false,"sender":{"key":"pw@padd.com","avatar":null},"body":"shish@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500:\n> 2013/1/12 Pete Wyckoff <pw@padd.com>:\n> > shish@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:\n> >> I'm in a situation where I don't have P4 admin rights to use the\n> >> --preserve-user option of git-p4. However, I would like to keep user\n> >> information in the associated Git branch.\n> >>\n> >> Would it be possible to add an option for this?\n> >\n> > The --preserve-user option is used to submit somebody else's work\n> > from git to p4.  It does \"p4 change -f\" to edit the author of the\n> > change after it has been submitted to p4.  P4 requires admin\n> > privileges to do that.\n> >\n> > Changes that are imported _from_ p4 to git do have the correct\n> > author information.\n> >\n> > Can you explain a bit more what you're looking for?\n> \n> Sorry I wasn't clear enough. When \"git p4 submit\" submits changes from\n> Git to P4, it also edits the Git history and replaces the Git commits'\n> authors by the information from the Perforce account submitting the\n> changes. The advantage is that both the P4 and Git repositories share\n> the same author information, but in my case I would like to keep in\n> the Git repository the original authors (because the P4 account I'm\n> using to submit to P4 is shared by all Git users).\n\nAh, I see what you're looking for now.  It's certainly possible\nto keep a mapping in the git side to remember who really wrote\neach change that went into p4, but there's nothing set up to do\nthat now.  And it would be a fair amount of work, with many\nlittle details.\n\nYou could put the true name in the commit message, like\nwe do signed-off-by messages: \"Author: Real Coder <rc@my.com>\".\nThat would keep the proper attribution, but not work with \"git\nlog --author\", e.g.; you'd have to use \"--grep='Real Coder'\"\ninstead.\n\n\t\t-- Pete\n"},{"id":"206643","messageId":"CAFXk4bp3RRkmEvubvYVRv795-92zn2tMrFJX61CcUQfyG6xB8g@mail.gmail.com","threadId":"32586","inReplyTo":"20130112225640.GA23079@padd.com","subject":"Re: Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Olivier Delalleau","fromEmail":"shish@keba.be","sentAt":"2013-01-13T04:56:06Z","receivedAt":"2013-01-13T04:56:06Z","isPatch":false,"sender":{"key":"shish@keba.be","avatar":null},"body":"2013/1/12 Pete Wyckoff <pw@padd.com>:\n> shish@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500:\n>> 2013/1/12 Pete Wyckoff <pw@padd.com>:\n>> > shish@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:\n>> >> I'm in a situation where I don't have P4 admin rights to use the\n>> >> --preserve-user option of git-p4. However, I would like to keep user\n>> >> information in the associated Git branch.\n>> >>\n>> >> Would it be possible to add an option for this?\n>> >\n>> > The --preserve-user option is used to submit somebody else's work\n>> > from git to p4.  It does \"p4 change -f\" to edit the author of the\n>> > change after it has been submitted to p4.  P4 requires admin\n>> > privileges to do that.\n>> >\n>> > Changes that are imported _from_ p4 to git do have the correct\n>> > author information.\n>> >\n>> > Can you explain a bit more what you're looking for?\n>>\n>> Sorry I wasn't clear enough. When \"git p4 submit\" submits changes from\n>> Git to P4, it also edits the Git history and replaces the Git commits'\n>> authors by the information from the Perforce account submitting the\n>> changes. The advantage is that both the P4 and Git repositories share\n>> the same author information, but in my case I would like to keep in\n>> the Git repository the original authors (because the P4 account I'm\n>> using to submit to P4 is shared by all Git users).\n>\n> Ah, I see what you're looking for now.  It's certainly possible\n> to keep a mapping in the git side to remember who really wrote\n> each change that went into p4, but there's nothing set up to do\n> that now.  And it would be a fair amount of work, with many\n> little details.\n>\n> You could put the true name in the commit message, like\n> we do signed-off-by messages: \"Author: Real Coder <rc@my.com>\".\n> That would keep the proper attribution, but not work with \"git\n> log --author\", e.g.; you'd have to use \"--grep='Real Coder'\"\n> instead.\n\nOk, thanks. I actually manage to hack my way around it, restoring the\nauthor information with \"git filter-branch\" and overriding the remote\np4 tracking branch with \"git update-ref\". Did some limited testing and\nit seems to work -- hopefully I won't have nasty surprises down the\nroad ;)\n\n-=- Olivier\n"},{"id":"221069","messageId":"loom.20130617T182148-463@post.gmane.org","threadId":"32586","inReplyTo":"CAFXk4bp3RRkmEvubvYVRv795-92zn2tMrFJX61CcUQfyG6xB8g@mail.gmail.com","subject":"Re: Suggestion: add option in git-p4 to preserve user in Git repository","fromName":"Deirdre Connolly","fromEmail":"neried7@gmail.com","sentAt":"2013-06-17T16:23:10Z","receivedAt":"2013-06-17T16:23:10Z","isPatch":false,"sender":{"key":"neried7@gmail.com","avatar":null},"body":"Olivier, did you upload your hacked version anywhere? \nI also need something like this.\n"}]}