0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[備忘メモ]プルリクの規模をclocで計る

Posted at

この記事は

  • すぐに忘れてしまうので単なる備忘メモです

やりたいこと

  • 本番リリースをする時にdevelop => masterにプルリクを作ってマージすると思います
  • だいぶ未来になってから、分析目的でそのプルリクで入った修正量を測定したいことがよく出てきます

利用ツール

  • git
  • cloc(詳細は割愛)

手順

マージコミットの特定

  • 履歴を表示します
bash
git log --pretty=oneline --first-parent master
  • そうするとずらっと履歴が出てくるので、/1000 等と打ってプルリク番号で検索します
  • Merge pull request #1000 from abc/develop 等が引っかかって出てくるのでそのハッシュと、その直前のハッシュをメモります

clocの実行

  • さっきのハッシュでclocを実行します
cloc --fullpath --exclude-dir=tests --diff マージコミットの1つ前のハッシュ マージコミットのハッシュ

終わりに

  • ちゃんとバージョンタグ打ってれば大丈夫という話もあるけどね
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?