August 21, 2005

在 Linux kernel 外應用 GIT,兼談分散式版本控制系統

如果要探討版本控制系統,Linux kernel 是非常特別的案例,拜網際網路所賜,獲得快速的發展,每天都有數十個 patch 被提交,而且有難以計數的學術與業界的研究計畫以 Linux kernel 為主軸,不用幾天,這些 patch 修改的幅度就大得驚人,所以許多工具相繼被提出以降低工作量。

之前在 [兩個大姑寫的〈Hacking the Linux 2.6 kernel〉] 一文提到廣為使用的 [cogitod] 工具,可管理為數眾多的 patch(set)。而原本 Linus 推薦使用的 BitKeeper 因為授權的議題,鬧得不愉快,所以 Linus 就自己搞一個,在 KernelTrap 上的專文 [Linux: Git Homepage] 介紹到 Git 這個新的 BitKeeper killer 已經有獨立的 [專案網頁],以及其概略的發展背景:
    "GIT falls into the category of distributed source code management tools, similar to Arch or Darcs (or, in the commercial world, BitKeeper). Every GIT working directory is a full-fledged repository with full revision tracking capabilities, not dependent on network access to a central server."
稍後,KernelTrap 又有一篇新文章 [Linux: Using Git For More Than The Kernel],既然 git 已經逐漸勝任 Linux kernel 這種嚴苛且特別的 VCS 需求,是不是有機會應用到其他專案去呢?後面的評論中,erikharrison 提到:
    SVN versus Git

    Subversion is in my mind the best of the classic centralized version control systems.

    Bitkeeper is the best of the new model of distributed version control systems.

    Git is a fast userspace, versioning, content addressable file system, which can be used to implement many of the things that Bitkeeper does.

    Linus really has a different philosophy of version control than that of the last 20 years. BK is very close to his vision, but not quite there. The centralized model, to Linus's mind (and I think he's right) is fundamentally broken, and SVN's on disk formats are pitifully slow for a project of the kernel's size. As such, the facts that
    • Git is not a complete version control tool
    • Git is relatively featureless
    • Git has very little in terms of a supporting toolset
    don't matter to Linus. Git meets his needs better.
實際的應用方式可以參考 XMMS2 hackers 的說法:
    We already use it.
    Comment posted by tru, August 16, 2005 - 05:12

    XMMS2 developement has been done in GIT for more then 3 months now. We are very happy about it and it works really well since we came from the free version of bk before.

    Our gitweb is here: http://git.xmms.se/
同時其他評論也相當精彩,Linux Kernel 配合高度分散式版本控制系統似乎是很值得探討的議題。
由 jserv 發表於 August 21, 2005 06:05 PM
迴響