私はリポジトリへのすべての寄付が含まれている次のスキーマのデータセットで終わるようにGitリポジトリを照会する必要があります。例えばGitリポジトリにMSR(マイニングソフトウェアリポジトリ)の目的を照会するにはどうすればよいですか?
user.id,
user.ip,
contribution.type,
timestamp,
commit.id,
file,
branch,
lines.added,
lines.deleted
:
u1,127.0.0.1,add,2015-01-01 00:00,c123456,/path/to/index.html,master,100,0
u1,127.0.0.1,mod,2015-01-01 00:00,c123456,/path/to/page1.html,master,3,6
u1,127.0.0.1,del,2015-01-01 00:00,c123456,/path/to/page2.html,master,0,200
u2,127.0.0.2,mod,2015-01-02 00:00,c654321,/path/to/index.html,master,2,2
u3,127.0.0.3,add,2015-01-03 00:00,c234567,/path/to/topic.html,topic,300,1
u4,127.0.0.4,mod,2015-01-04 00:00,c765432,/path/to/topic.html,topic,21,1
なお、 1つの行はコミットではなく1つのファイルに対する1つの貢献を表すべきです。つまり、1つのコミットは複数の行にまたがることがあります。
これまでのところ、私はgit log -g --numstat --decorate --source --date=iso --no-merges --all --format=%aE,%h,%ad,%gd
で回り込んでいます。私は--name-status
(contribution_typeとファイル)と--numstat
(lines.added、lines.deleted)の情報を上記の形式にマージするために出力を後処理しなければならないと思います。また、私はIPアドレスを取得する方法をまだ分かっていません - gitリポジトリは "プッシュ"を受け取ったときにこの情報を記録しますか?