Skip to content

Commit

Permalink
git-hooks; don't touch commit --amend message
Browse files Browse the repository at this point in the history
  • Loading branch information
skanev committed Jan 26, 2021
1 parent f989fca commit 6ef360e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

message = File.read(ARGV[0])

exit 0 unless message.start_with? "\n"

prefixes = [
[%r{^other/clrs/(\d+)/(\d+)/(\d+)\.}, -> { "clrs; exercise #{$1.to_i}.#{$2.to_i}.#{$3.to_i} – " }],
[%r{^other/clrs/(\d+)/problems/(\d+)\.}, -> {
Expand Down

0 comments on commit 6ef360e

Please sign in to comment.