Re: [PATCH] git-p4: Corrected typo.
- From
- Thomas Berg <merlin66b@gmail.com>
- Date
- Feb 4, 2011, 08:59 UTC
- Message-ID
- <AANLkTinO02E1GrMjb1J5gQTOhGYf8QsnABU_1ehQonDX@mail.gmail.com>
- In-Reply-To
- <AANLkTin5yR84x=3Qb3W9bZYhUHwbcrhf60Z1CwHyYHOL@mail.gmail.com>
On Mon, Jan 31, 2011 at 4:54 PM, Vitor Antunes <vitor.hda@gmail.com> wrote:
Show 13 quoted lines
> Hi Thomas, > >> On Mon, Jan 31, 2011 at 12:51 PM, Thomas Berg <merlin66b@gmail.com> wrote: >>> I also discovered bugs in git-p4: in some cases, if the first submit >>> to a new branch in Perforce is not identical to the branch it derives >>> from, the import was not correct. > > I forgot to answer this specific topic. I also noticed this bug. > Basically, git-p4 choses the first commit from the origin branch to > start the branch from. My idea was to walk through the commit tree in > the original branch until I find a commit in which the diff is null. > Unfortunately, I don't know what is the best approach to achieve this > in git. Do you have any ideas?
The thing is that the diff doesn't have to be null either, if an "evil" branching has happened - the submit that creates the new branch contains a different tree than the source branch. It would probably work well in most cases though, you could just fall back to the current behaviour if no zero-diff parent is found. I'm sure it's easy with some git plumbing commands, but I'm of little help there.
I haven't had time to test your patches yet, hope to get some time soon...
Cheers, Thomas