diff --git a/.gitattributes b/.gitattributes index a13586b3259139177a3b6811da3467e7bfe64127..3491fef384e96c6cd631cf09ed33fff110e36ef5 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 63854ce8b106ca013c1071874207f108e283d926..0000000000000000000000000000000000000000 --- 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 fe30f120f9ef070dfd9abcf487967bae3d802f17..96ef5628831e0a2a0f9f8ecc1b8d2d6187a79137 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 cd6397eaad97c33afc40e018e6c261bf15595fb7..0000000000000000000000000000000000000000 --- 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