31
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitレポジトリで一番活発に編集されているファイル

Posted at
git ls-files -z                     | \
    parallel -0 -j32 -I.           -- \
        echo -n . \\\              \; \
        git log --format=oneline . \| \
        wc -l                       | \
    sort -k2 -nr                    | \
    head

これでランキングが出せる。ただし体感ではコミット数のO(n2)で遅くなっていくぽく感じるので、歴史のあるレポジトリほど遅くなっていくので要注意ではある。

Rubyの場合だとこんなかんじ

zsh % git ls-files -z | parallel -0 -j32 --line-buffer -I. -- echo -n . \\\  \; git log --format=oneline . \| wc -l | sort -k2 -nr | head -n 30
version.h  5295
io.c  1519
configure.in  1467
parse.y  1396
gc.c  1363
eval.c  1340
string.c  1334
common.mk  958
NEWS  779
array.c  759
bignum.c  748
process.c  733
thread.c  680
file.c  677
numeric.c  661
win32/win32.c  655
vm.c  628
lib/mkmf.rb  619
compile.c  573
hash.c  568
object.c  538
internal.h  531
ruby.c  525
vm_insnhelper.c  490
win32/Makefile.sub  482
re.c  482
include/ruby/ruby.h  454
time.c  444
vm_core.h  426
proc.c  408
31
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?