之前簡單寫了個工具,展示目前 git 目錄中的作者, 今日以 CC0 授權釋出: git-authors

使用方式就是 cd 到某個目錄,然後執行 git-authors,可以附個檔名。

例如:列出 perlbrew 專案中 commit 數量前 10 名的作者:

[~/Projects/perlbrew/App-perlbrew]
> git authors | head -10
commits%  commits      +++      ---
  56.99%      530   +18350   -15322  Kang-min Liu <gugod@gugod.org>
   1.72%       16     +365     -240  Pedro Melo <melo@simplicidade.org>
   1.51%       14     +283      -77  Chris Prather <chris@prather.org>
   1.18%       11      +67      -21  Tatsuhiko Miyagawa <miyagawa@bulknews.net>
   1.18%       11      +28      -24  Randy Stauner <randy@magnificent-tears.com>
   0.97%        9     +100      -81  Yuki Ibe <yibe@yibe.org>
   0.65%        6     +340     -209  Mike Doherty <doherty@cs.dal.ca>
   0.65%        6     +315      -51  Rob Hoelz <rob@hoelz.ro>
   0.65%        6      +20      -13  Sawyer X <xsawyerx@cpan.org>

給檔名的話就會只顯示與此檔名相關的作者:

[~/src/perl]
> git-authors ./README.tw
commits%  commits      +++      ---
  16.67%        2      +68      -68  Chia-liang Kao <clkao@clkao.org>
  16.67%        2       +2       -2  Nicholas Clark <nick@ccl4.org>
   8.33%        1      +45      -22  Jarkko Hietaniemi <jhi@iki.fi>
   8.33%        1       +6       -4  Audrey Tang <cpan@audreyt.org>
   8.33%        1       +1       -1  Leon Brocard <acme@astray.com>
   8.33%        1       +1       -1  Steffen Müller <0mgwtfbbq@sneakemail.com>

注意事項:解讀數字,不甚容易。 :-)