From ff6d64b257d9c5f633849bbe54af22a9ba0dc87d Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Fri, 19 Jun 2020 13:55:54 +0200
Subject: [PATCH] Removed git lfs config.

Closes #2961.
---
 .gitattributes                      |  2 --
 .lfsconfig                          |  2 --
 .pre-commit-config.yaml             |  5 ----
 scripts/hooks/pre-commit-git-lfs.sh | 38 -----------------------------
 4 files changed, 47 deletions(-)
 delete mode 100644 .lfsconfig
 delete mode 100755 scripts/hooks/pre-commit-git-lfs.sh

diff --git a/.gitattributes b/.gitattributes
index a13586b3259..3491fef384e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,5 +8,3 @@
 *.h   hooks.style=uncrustify
 *.cpp hooks.style=uncrustify
 *.hpp hooks.style=uncrustify
-# Git LFS
-# Gocad files
diff --git a/.lfsconfig b/.lfsconfig
deleted file mode 100644
index 63854ce8b10..00000000000
--- a/.lfsconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-[lfs]
-    url = https://ogs.jfrog.io/ogs/api/lfs/ogs
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fe30f120f9e..96ef5628831 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -22,11 +22,6 @@ repos:
         language: system
         files: '.*\.cpp'
         stages: [commit, manual]
-    -   id: git-lfs
-        name: Check git lfs files
-        entry: scripts/hooks/pre-commit-git-lfs.sh
-        language: system
-        stages: [commit, manual]
     -   id: cmake-format
         name: Format CMake files
         entry: scripts/hooks/pre-commit-cmake-format.sh
diff --git a/scripts/hooks/pre-commit-git-lfs.sh b/scripts/hooks/pre-commit-git-lfs.sh
deleted file mode 100755
index cd6397eaad9..00000000000
--- a/scripts/hooks/pre-commit-git-lfs.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bash
-
-BINARY_FILES=""
-LFS_FILES=""
-
-LFS_FILES=()
-for FILE in "$@"
-do
-    LFS_FILE=$(git check-attr filter "$FILE" | grep 'filter: lfs$' | sed -e 's/: filter: lfs//')
-    if [ ! -z "$LFS_FILE" ]; then
-        LFS_FILES+=("$LFS_FILE")
-    fi
-done
-
-if [ -z "$LFS_FILES" ]; then
-    exit 0
-fi
-
-for FILE in ${LFS_FILES[@]}
-do
-    SOFT_SHA=$(git hash-object -w "$FILE")
-    RAW_SHA=$(git hash-object -w --no-filters "$FILE")
-
-    if [ $SOFT_SHA == $RAW_SHA ]; then
-        BINARY_FILES="$FILE\n$BINARY_FILES"
-    fi
-done
-
-if [[ -n "$BINARY_FILES" ]]; then
-    echo "Attention!"
-    echo "----------"
-    echo "You tried to commit binary files:"
-    echo -e "\x1B[31m$BINARY_FILES\x1B[0m"
-    echo "Make sure you have git-lfs installed properly!"
-    echo "Revert your changes and commit those files with git-lfs!"
-    echo "----------"
-    exit 1
-fi
-- 
GitLab