Sha256: 9d5c0da594db8b54ae9b6301ccdc8d506004efb89d8b42fef54b81f46c021872

Contents?: true

Size: 330 Bytes

Versions: 1

Compression:

Stored size: 330 Bytes

Contents

#! /usr/bin/ruby

require 'lib/legit_helper'

todo_string = ARGV[0] || 'TODO'
system("git diff --staged | grep '^+' | grep #{todo_string}")

if $?.success?
  show("[pre-commit hook] Aborting commit... found staged `#{todo_string}`s.", :warning)
  exit 1
else
  show("Success: No `#{todo_string}`s staged.", :success)
  exit 0
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legit-0.0.1 bin/git-catch-todos