# git-p4 using notes

3 messages from 2011-12-16 to 2011-12-17. Participants: Michael Horowitz, Luke Diamand.
Thread: https://gitlist.dev/t/29183

## Michael Horowitz, 2011-12-16 16:07

Subject: git-p4 using notes
Message-ID: <CAFLRbori1Dinc2epputWfjgCOWp7M2f=+TA0w2jHq_fmRC=y3w@mail.gmail.com>
URL: https://gitlist.dev/e/CAFLRbori1Dinc2epputWfjgCOWp7M2f%3D%2BTA0w2jHq_fmRC%3Dy3w%40mail.gmail.com

```
For those of you using git-p4 because of a company requirement to use
Perforce, but really wish you could use git only, the most frustrating
part is the fact that when changes are submitted, the commit message
is rewritten to include a reference to the P4 change number which is
used by the sync.  When syncing back changes, this causes the commit
hash to be different, and so blows away your old commit and any parent
commit references and such.

I read someplace, I can't remember where at this point, that if git-p4
used notes to write the P4 change information, that would not impact
the commit hash, so when merging back, things would not be
overwritten, and you can maintain branches and commit history properly
in git.

I just ran into this project, where it seems that someone has
re-written git-p4 to use notes: https://github.com/ermshiperete/git-p4

I was wondering if any of the maintainers of git-p4 has considered
this, and might want to leverage this work to merge into the main git
repo, possibly with an option to choose between the two behaviors.

Thanks,

Mike

```

## Luke Diamand, 2011-12-16 19:55

Subject: Re: git-p4 using notes
Message-ID: <4EEBA24F.8030103@diamand.org>
URL: https://gitlist.dev/e/4EEBA24F.8030103%40diamand.org
In-Reply-To: <CAFLRbori1Dinc2epputWfjgCOWp7M2f=+TA0w2jHq_fmRC=y3w@mail.gmail.com>

```
On 16/12/11 16:07, Michael Horowitz wrote:
> For those of you using git-p4 because of a company requirement to use
> Perforce, but really wish you could use git only, the most frustrating
> part is the fact that when changes are submitted, the commit message
> is rewritten to include a reference to the P4 change number which is
> used by the sync.  When syncing back changes, this causes the commit
> hash to be different, and so blows away your old commit and any parent
> commit references and such.
>
> I read someplace, I can't remember where at this point, that if git-p4
> used notes to write the P4 change information, that would not impact
> the commit hash, so when merging back, things would not be
> overwritten, and you can maintain branches and commit history properly
> in git.
>
> I just ran into this project, where it seems that someone has
> re-written git-p4 to use notes: https://github.com/ermshiperete/git-p4
>
> I was wondering if any of the maintainers of git-p4 has considered
> this, and might want to leverage this work to merge into the main git
> repo, possibly with an option to choose between the two behaviors.

I'm not sure I qualify for such a grand title as maintainer, but I was 
going to give this a go in the new year as it would be quite useful, 
unless someone beat me to it. I want to fix some problems with labels 
first though.

Regards!
Luke

```

## Michael Horowitz, 2011-12-17 00:57

Subject: Re: git-p4 using notes
Message-ID: <CAFLRboq3--JcfWb=-p-hoNMsQZ-fHS3=5dgYc-pwQy7-rGy-gQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAFLRboq3--JcfWb%3D-p-hoNMsQZ-fHS3%3D5dgYc-pwQy7-rGy-gQ%40mail.gmail.com
In-Reply-To: <4EEBA24F.8030103@diamand.org>

```
That would be great.  If you need me to help test, let me know.
Unfortunately I don't know Python and I know very little about the
internals of git, so I can't help much more than that...

Mike



On Fri, Dec 16, 2011 at 2:55 PM, Luke Diamand <luke@diamand.org> wrote:
> On 16/12/11 16:07, Michael Horowitz wrote:
>>
>> For those of you using git-p4 because of a company requirement to use
>> Perforce, but really wish you could use git only, the most frustrating
>> part is the fact that when changes are submitted, the commit message
>> is rewritten to include a reference to the P4 change number which is
>> used by the sync.  When syncing back changes, this causes the commit
>> hash to be different, and so blows away your old commit and any parent
>> commit references and such.
>>
>> I read someplace, I can't remember where at this point, that if git-p4
>> used notes to write the P4 change information, that would not impact
>> the commit hash, so when merging back, things would not be
>> overwritten, and you can maintain branches and commit history properly
>> in git.
>>
>> I just ran into this project, where it seems that someone has
>> re-written git-p4 to use notes: https://github.com/ermshiperete/git-p4
>>
>> I was wondering if any of the maintainers of git-p4 has considered
>> this, and might want to leverage this work to merge into the main git
>> repo, possibly with an option to choose between the two behaviors.
>
>
> I'm not sure I qualify for such a grand title as maintainer, but I was going
> to give this a go in the new year as it would be quite useful, unless
> someone beat me to it. I want to fix some problems with labels first though.
>
> Regards!
> Luke

```
