From 61c24615e6ac76105c6e967e59ef99528d85d392 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 24 Jan 2018 15:27:14 +0100 Subject: [PATCH] Remove git_hooks --- git_hooks/README | 3 --- git_hooks/hooks-install.sh | 9 --------- git_hooks/post-checkout | 5 ----- git_hooks/post-commit | 5 ----- git_hooks/post-merge | 5 ----- git_hooks/pre-commit | 23 ----------------------- 6 files changed, 50 deletions(-) delete mode 100644 git_hooks/README delete mode 100755 git_hooks/hooks-install.sh delete mode 100755 git_hooks/post-checkout delete mode 100755 git_hooks/post-commit delete mode 100755 git_hooks/post-merge delete mode 100755 git_hooks/pre-commit diff --git a/git_hooks/README b/git_hooks/README deleted file mode 100644 index e2edfc91c..000000000 --- a/git_hooks/README +++ /dev/null @@ -1,3 +0,0 @@ -Git hooks that writes current git revision into git_revision file that is afterwards used to show revision in program in About dialog. - -Install these hooks by running hooks-install.sh script (copy into .git/hooks/ directory) diff --git a/git_hooks/hooks-install.sh b/git_hooks/hooks-install.sh deleted file mode 100755 index aec38b9bf..000000000 --- a/git_hooks/hooks-install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# -# Install hooks into .git/hooks directory -# - -cp pre-commit ../.git/hooks/pre-commit -cp post-commit ../.git/hooks/post-commit -cp post-checkout ../.git/hooks/post-checkout -cp post-merge ../.git/hooks/post-merge diff --git a/git_hooks/post-checkout b/git_hooks/post-checkout deleted file mode 100755 index 8c3664d93..000000000 --- a/git_hooks/post-checkout +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# -# Writes git revision into git_revision file -# -git rev-parse HEAD > git_revision diff --git a/git_hooks/post-commit b/git_hooks/post-commit deleted file mode 100755 index 8c3664d93..000000000 --- a/git_hooks/post-commit +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# -# Writes git revision into git_revision file -# -git rev-parse HEAD > git_revision diff --git a/git_hooks/post-merge b/git_hooks/post-merge deleted file mode 100755 index 8c3664d93..000000000 --- a/git_hooks/post-merge +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# -# Writes git revision into git_revision file -# -git rev-parse HEAD > git_revision diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit deleted file mode 100755 index 3d1f36155..000000000 --- a/git_hooks/pre-commit +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# Check if copyright statements include the current year -# http://damien.lespiau.name/blog/2013/01/13/a-git-pre-commit -# -files=`git diff --cached --name-only | grep '[.cpp|.h]$'` -year=`date +"%Y"` - -for f in $files; do - head -10 $f | grep -i copyright 2>&1 1>/dev/null || continue - - if ! grep -i -e "copyright.*$year" $f 2>&1 1>/dev/null; then - missing_copyright_files="$missing_copyright_files $f" - fi -done - -if [ -n "$missing_copyright_files" ]; then - echo "$year is missing in the copyright notice of the following files:" - for f in $missing_copyright_files; do - echo " $f" - done - exit 1 -fi