From f3ba02aa7e33885e106c0ff805983eb3a4911f41 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Mon, 29 Mar 2021 15:09:50 +0200 Subject: [PATCH] gitconfig: update delta color scheme --- gitconfig | 4 +++- script/validatecommit.rb | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 script/validatecommit.rb diff --git a/gitconfig b/gitconfig index be41f09..f1d92ed 100644 --- a/gitconfig +++ b/gitconfig @@ -54,7 +54,9 @@ diffFilter = delta --color-only [delta] side-by-side = true -[delta "decorations"] + plus-style = 'syntax "#142e20"' + zero-style = 'syntax "#1d1f21" dim' + minus-style = 'syntax "#36181d"' commit-decoration-style = bold yellow box ul file-style = bold yellow ul file-decoration-style = none diff --git a/script/validatecommit.rb b/script/validatecommit.rb new file mode 100644 index 0000000..90f717b --- /dev/null +++ b/script/validatecommit.rb @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +# +# frozen_string_literal: true + +msg = File.read(ARGV[0]) +unless /\A[[:upper:]]/.match?(msg) + puts 'Commit message does not start with an uppercase character' + exit 1 +end