From 9b1f5298dd42ed5f4f7ef249088f3f04f3c3eee8 Mon Sep 17 00:00:00 2001
From: "flyingscorpio@arch-desktop" <tfranken@protonmail.com>
Date: Tue, 8 Sep 2020 11:27:52 +0200
Subject: [PATCH] Remove git hooks

---
 README.md            |  6 ------
 git_hooks/pre-push   | 11 -----------
 symlink_git_hooks.sh | 17 -----------------
 3 files changed, 34 deletions(-)
 delete mode 100755 git_hooks/pre-push
 delete mode 100755 symlink_git_hooks.sh

diff --git a/README.md b/README.md
index 74c729f..63e2a9e 100644
--- a/README.md
+++ b/README.md
@@ -31,9 +31,6 @@ Lists the things to install, which includes programs, symlinks, git clones, shel
 * `dotfiles/`<br>
 The actual dotfiles. They are symlinked to the location that the system expects to find them.
 
-* `git_hooks/`<br>
-See `symlink_git_hooks.sh`.
-
 * `install.py`<br>
 Installs everything using `configs.yml`. This is the file to actually run.
 
@@ -46,9 +43,6 @@ You need to manually copy or symlink any hook to `/etc/pacman.d/hooks/` to activ
 * `shellcheck_binary_fix.sh`<br>
 When running this on Manjaro, pacman was unable to find the shellcheck package, so this script installs the pre-compiled binary instead. If your package manager finds shellcheck, this script won't run.
 
-* `symlink_git_hooks.sh`<br>
-Helper script to symlink any hook in `git_hooks/` to your local `.git/hooks/` folder. Only for personal use to keep my git hooks version controlled.
-
 * `todo`<br>
 Never seems to remain empty...
 
diff --git a/git_hooks/pre-push b/git_hooks/pre-push
deleted file mode 100755
index 919fbb7..0000000
--- a/git_hooks/pre-push
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-remote="$1"
-url="$2"
-
-if [ "$remote" = 'gitlab' ] || [ "$url" = 'git@gitlab.com:flyingscorpio/SetupCockpit.git' ]; then
-    exit 0
-fi
-echo "Pushing to Gitlab..."
-git push gitlab master
-exit 0
diff --git a/symlink_git_hooks.sh b/symlink_git_hooks.sh
deleted file mode 100755
index 87cd6ca..0000000
--- a/symlink_git_hooks.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# Handy script to symlink version controlled hooks (from git_hooks/) to local hooks (.git/hooks/)
-
-HOOK_DIR=$(git rev-parse --show-toplevel)/.git/hooks
-for hook in "$(git rev-parse --show-toplevel)"/git_hooks/*; do
-  # If the hook already exists, is executable, and is not a symlink
-  if [ ! -h "$HOOK_DIR/$hook" ] && [ -x "$HOOK_DIR/$hook" ]; then
-    echo "$hook already exists, renaming to $hook.local"
-    mv "$HOOK_DIR/$hook" "$HOOK_DIR/$hook.local"
-  fi
-  # create the symlink, overwriting the file if it exists
-  # probably the only way this would happen is if using an old version of git,
-  # -- back when the sample hooks were not executable, instead of being named ____.sample
-  ln -s -f "$hook" "$HOOK_DIR/"
-  echo "created symlink $hook"
-done
-echo "done"