gitを運用していて、だれがどれくらい変更したんだろうとか調べたくなってみました。
とりあえず以下のようなことができるかなという感じです。
誰が何回commitしたか?
git shortlog --summary -n
特定の人が何行変更したか?
find app spec -type f | xargs -n1 git --no-pager blame -f -w|grep xxx| wc -l
上記では、app、spec配下のファイルをxxxさんが変更した行数を取得している感じです。gitを運用していて、だれがどれくらい変更したんだろうとか調べたくなってみました。
とりあえず以下のようなことができるかなという感じです。
誰が何回commitしたか?
git shortlog --summary -n
find app spec -type f | xargs -n1 git --no-pager blame -f -w|grep xxx| wc -l
上記では、app、spec配下のファイルをxxxさんが変更した行数を取得している感じです。CentOS6の環境でrailsのrspecの全件試験をしたときに、試験の後半で
「ActiveRecord::ConnectionNotEstablished:No connection pool with 'primary' found.」
というエラーが連発して発生することがありました。
エラーが発生したテストケースを個別に実行するとエラーがでない感じです。
どうも調べていたらCentOS6のulimitの上限がありそうな気配でした。
以下参考です。
こちらを参考に
/etc/security/limits.d/90-nproc.conf
の内容を
* soft nproc 1024
から
* soft nproc 2048
へ変更したら無事にエラーが消えました。
select 'head1','head2','head3' union select * from ( select col1,col2,col3 from tbl order by col1 ) as tmp INTO OUTFILE '/tmp/sort_data.csv' FIELDS TERMINATED BY ',';
head1,head2,head3 1,bbb,ccc 2,aaa,bbb 3,ccc,aaa
#begin # ActiveRecord::Migration.maintain_test_schema! #rescue ActiveRecord::PendingMigrationError => e # puts e.to_s.strip # exit 1 #end
Host github.com HostName ssh.github.com Port 443 ProxyCommand /usr/bin/ncat --proxy <server>:<port> --proxy-type http %h %p-----------------------