2013/3/15 Dmitry Stogov dmitry@zend.com:
Hi,
For now, I'm trying subtree merging (See http://git-scm.com/book/ch6-7.htmland
https://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
)You may see the result at https://github.com/dstogov/php-src/tree/PHP-5.5/
This is not an ideal solution:
- "git log" doesn't show full history on O+ files (however it's stored in
GIT)- merging from PHP to existing O+ git repo (for pecl release) is not
trivial.Anyway I'm going to merge O+ into PHP-5.5 today.
Using "git subtree merge" you will definitely loose log, however, ZO+
hasn't been pushed to github with its full history anyway, which is a
bit sad.
You should use a merge technique that relies on "git filter-branch" if
you want to keep the history.
Patrick
I mean not "git subtree merge" but "git read-dir --prefix ...".
Actually it imports all the history form O+ repo, but it's recorded with
original patches (e.g. ZendAccelerator.h instead of moved
ext/ZendOptimizerPlus/ZendAccelerator.h), so you can see it running "git
log", but not "git log ext/ZendOptimizerPlus/ZendAccelerator.h".
Thanks. Dmitry.
On Fri, Mar 15, 2013 at 1:16 PM, Patrick ALLAERT patrickallaert@php.netwrote:
2013/3/15 Dmitry Stogov dmitry@zend.com:
Hi,
For now, I'm trying subtree merging (See
http://git-scm.com/book/ch6-7.htmlandhttps://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
)
You may see the result at
https://github.com/dstogov/php-src/tree/PHP-5.5/This is not an ideal solution:
- "git log" doesn't show full history on O+ files (however it's stored in
GIT)- merging from PHP to existing O+ git repo (for pecl release) is not
trivial.Anyway I'm going to merge O+ into PHP-5.5 today.
Using "git subtree merge" you will definitely loose log, however, ZO+
hasn't been pushed to github with its full history anyway, which is a
bit sad.
You should use a merge technique that relies on "git filter-branch" if
you want to keep the history.Patrick
I mean not "git subtree merge" but "git read-dir --prefix ...".
Actually it imports all the history form O+ repo, but it's recorded with
original patches (e.g. ZendAccelerator.h instead of moved
ext/ZendOptimizerPlus/ZendAccelerator.h), so you can see it running "git
log", but not "git log ext/ZendOptimizerPlus/ZendAccelerator.h".
btw, it has to be renamed to opcache, aka ext/opcache. I suppose all
ini settings have to be updated as well.
Cheers,
Pierre
@pierrejoye
Yeah, I'm working in this direction.
Agree, it's better to do it before the merging.
Thanks. Dmitry.
I mean not "git subtree merge" but "git read-dir --prefix ...".
Actually it imports all the history form O+ repo, but it's recorded with
original patches (e.g. ZendAccelerator.h instead of moved
ext/ZendOptimizerPlus/ZendAccelerator.h), so you can see it running "git
log", but not "git log ext/ZendOptimizerPlus/ZendAccelerator.h".btw, it has to be renamed to opcache, aka ext/opcache. I suppose all
ini settings have to be updated as well.Cheers,
Pierre
@pierrejoye
I mean not "git subtree merge" but "git read-dir --prefix ...".
Actually it imports all the history form O+ repo, but it's recorded with
original patches (e.g. ZendAccelerator.h instead of moved
ext/ZendOptimizerPlus/ZendAccelerator.h), so you can see it running "git
log", but not "git log ext/ZendOptimizerPlus/ZendAccelerator.h".
Here you are:
$ git clone git://github.com/zend-dev/ZendOptimizerPlus.git
$ git clone git://github.com/php/php-src.git
$ cd php-src
$ git remote add opcode ../ZendOptimizerPlus
$ git checkout -b opcode opcode/master
$ git filter-branch -f --index-filter 'git read-tree --empty ; git
read-tree --prefix=ext/opcode "$GIT_COMMIT"' HEAD
$ git checkout -b master origin/master
$ git merge opcode
Damien
This solution clones the history, but makes merging between PHP and O+ repo
(it's going to be used for pecl build for old PHP versions) even more
difficult.
Thanks. Dmitry.
I mean not "git subtree merge" but "git read-dir --prefix ...".
Actually it imports all the history form O+ repo, but it's recorded with
original patches (e.g. ZendAccelerator.h instead of moved
ext/ZendOptimizerPlus/ZendAccelerator.h), so you can see it running "git
log", but not "git log ext/ZendOptimizerPlus/ZendAccelerator.h".Here you are:
$ git clone git://github.com/zend-dev/ZendOptimizerPlus.git
$ git clone git://github.com/php/php-src.git
$ cd php-src
$ git remote add opcode ../ZendOptimizerPlus
$ git checkout -b opcode opcode/master
$ git filter-branch -f --index-filter 'git read-tree --empty ; git
read-tree --prefix=ext/opcode "$GIT_COMMIT"' HEAD
$ git checkout -b master origin/master
$ git merge opcodeDamien
This solution clones the history, but makes merging between PHP and O+ repo
(it's going to be used for pecl build for old PHP versions) even more
difficult.Thanks. Dmitry.
Not sure. Merging between the two repositories using the subtree
strategy should be just fine.
… and having the history (ie. the common ancestors) should even help the merge
algorithm.
Damien
The problem that this approach renames the commits an they are not the same
anymore (as in O+ repo).
Usage of subtree strategy is not perfect, but it's something that more or
less works.
Thanks. Dmitry.
This solution clones the history, but makes merging between PHP and O+
repo
(it's going to be used for pecl build for old PHP versions) even more
difficult.Thanks. Dmitry.
Not sure. Merging between the two repositories using the subtree
strategy should be just fine.
… and having the history (ie. the common ancestors) should even help the
merge
algorithm.Damien