On Tue, May 19, 2009 at 12:38 AM, Avery Pennarun <apenwarr@xxxxxxxxx> wrote: > On Mon, May 18, 2009 at 11:55 AM, Ping Yin <pkufranky@xxxxxxxxx> wrote: >> It's really a cool feature, but i havn't tried it. Why? >> >> It will spends me some time saving and applying the patches and then >> testing it (i don't have the appropriate environment setuped). But I >> am busy and there is no urgent need to use this feature ( it is only a >> rare case for me). So i will wait until i need the feature or there >> is an easy to fetch the code ( pu of official reposotory or other >> repository with these patches applied). > > Excellent, thanks for the feedback. In fact you can git clone the > code from here: > > git clone git://github.com/apenwarr/git-subtree.git > > (It's not a copy of the git repo; it's a tiny standalone repo.) > > The important file is 'git-subtree'. Copy this anywhere on your PATH, > and magically the 'git subtree' command will work. > > I admit that your next roadblock will probably be lack of > documentation, though, as Junio points out. > Some problems after trying. * "split" generates a commit hash which i take some time to figure out the meaning. May it should accept one more argument (repository name) to generate the repository directly? * "pull" creates the merged files to the wrong directory. Following is the output git subtree -d pull --prefix=foo git@xxxxxxxxxxx:foo.git master command: {pull} quiet: {} revs: {} dir: {foo} opts: {git@xxxxxxxxxxx:foo.git master} + git pull -s subtree git@xxxxxxxxxxx:foo.git master >From example.com:foo * branch master -> FETCH_HEAD Merge made by subtree. scripts/data.example/creatives/1.swf | Bin 0 -> 174109 bytes scripts/data.example/creatives/2.swf | Bin 0 -> 103622 bytes scripts/data.example/creatives/3.swf | Bin 0 -> 35347 bytes scripts/data.example/creatives/4.swf | Bin 0 -> 16300 bytes 5 files changed, 0 insertions(+), 0 deletions(-) ... * "merge" doesn't respect the prefix option. With the following commands, foo.txt is not merged to subdir foo/ touch foo.txt && git add foo.txt && git commit -m "add foo.txt" git branch foo && git reset --hard HEAD^ git subtree merge --prefix=foo foo -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html