Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions update
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ use strict;

# 効率化のために$oldと処理の終わったハッシュ値をハッシュテーブルにでも入れておいて、
# $crntがハッシュテーブルにすでに含まれている場合、そこの処理を切り上げるとかする?
my $ref = $ARGV[0];
my $old = $ARGV[1];
my $new = $ARGV[2];
my ($ref, $old, $new) = @ARGV;

# push, pop, shift, unshiftのどの組み合わせが効率いいのか知らないけど、
# キュー的に使いたいのと、終了判定が面倒だったのでpushとshiftを選択
Expand Down Expand Up @@ -42,13 +40,15 @@ while (my $crnt = shift(@waiting)) {
# 空行の次の行にコミットメッセージの先頭行があるので、
# その行にチケットIDが含まれているかどうかを確認する
unless ($lines[$index + 1] =~ /refs #\d+/) {
print "\n";
print "+----------------------------------------+\n";
print "| please input ticket id to all commits. |\n";
print "+----------------------------------------+\n";
print "\n";
print " rejected ref: ", $ref, "\n";
print "\n";
print << " ...";

+----------------------------------------+
| please input ticket id to all commits. |
+----------------------------------------+

rejected ref: $ref

...
exit(1);
}
}