Tuesday, December 16, 2014

GitHub で submodule ではなく subtree を使うべき理由

GitHub には、タグを打つとソースパッケージを自動的にリリースするという機能があります。スクリプト言語においては、それぞれの言語について一般的なパッケージ管理システム注1があるため、この機能を使うことが少ないかと思いますが、デファクトのパッケージ管理システムが存在しないC等の言語で書かれたプログラムや、単独で動作する管理用のスクリプトを GitHub で開発・配布する際には、本機能はとても便利なものです。

しかし、この機能は git-archive コマンドのラッパーとして実装されているため、サブモジュールのファイルが含まれないという問題を抱えています。この点は GitHub の人たちも認識しているものの、今のところ GitHub で独自に対応するということは考えていないようです注2

私がこの問題を 知ることになったのは、picojson の issue で指摘を受けたからです。picojson については問題が「テストが動かない」という程度なので後回しにしても良かったのですが、H2O についても同様の問題が発生することが目に見えていました。

そこでどうするか、irc で相談、実験した結果、サブモジュールのかわりに サブツリーを使えば、参照先のファイルについても git-archive の結果に含めることが可能であることがわかり、picojson についてはサブツリーへの移行を完了しました。

ツールの仕様に引っ張られてやり方を変えるという、ある意味しょうもない話なのですが、H2O についても今後リリースまでにサブツリーへの切り替えを行おうと考えています。

※本記事 H2O Advent Calendar 2014 の一部です。

注1: たとえば Perl については CPAN、JavaScript については NPM が存在する
注2: 参照: » Github zip doesn’t include Submodules Academic Technology Group Developers Blog のコメント

12 comments:



  1. In your blog I was happy to see your article, better than last time, and have made great progress, I am very pleased. I am looking forward to your article will become better and better.
    hotmail login | red ball

    ReplyDelete



  2. The blog or and best that is extremely useful to keep I can share the ideas
    of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    tanki online | 2048 game|

    ReplyDelete
  3. This is very interesting, You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your web site in my social networks!
    Regards - www.office.com/setup
    www.office.com/setup

    ReplyDelete
  4. I'm shakshi.I am working in India top most Escort service Mumbai Call girls.If u want to join the all facility of escorts Puri call girls
    pls call me & whatssap Cuttack call girls
    visit the sites. Bhubaneswar call girls or follow me. jaipur call girls

    ReplyDelete
  5. Webroot.com/safe is a protection software solution that communicates with the cloud avoiding the hassle to manage the signature updates to deploy. for office setup visit office.com/setup

    ReplyDelete
  6. و هى مبيدات أمنة لا تضر بصحة عملائنا و خاصة الاطفال و الكهول فنحن نستخدمها فى البيوت و المنازل و المطاعم و الفنادق و المستشفيات و غيرهما كما تعتمد المؤسسة على احسن الأساليب الحديثةالتى يمكنها ان تقتل و تطرد الحشرات من البق و الفئران و ذلك يمنع الحشرات من الاقتراب من البيت و من الممكن أن يكون هناك
    شركة النجوم لمكافحة الحشرات
    شركة مكافحة حشرات بجدة
    شركة مكافحة الصراصير بمكة
    شركة مكافحة حشرات بمكة

    ReplyDelete
  7. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information.

    norton.com/setup
    mcafee.com/activate
    office.com/setup

    ReplyDelete
  8. This weblog is somehow different from other weblogs. For more info do visit:-
    office.com/setup

    norton.com/setup

    mcafee.com/activate

    ReplyDelete

Note: Only a member of this blog may post a comment.