dont always do git lfs
This commit is contained in:
parent
d644581eb2
commit
c241963f56
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
|
|
||||||
git lfs post-checkout "$@"
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; }
|
|
||||||
git lfs post-commit "$@"
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
|
|
||||||
git lfs post-merge "$@"
|
|
|
@ -2,8 +2,9 @@
|
||||||
# check for WIP commits
|
# check for WIP commits
|
||||||
wips=$(git log --oneline --no-decorate | grep -i wip )
|
wips=$(git log --oneline --no-decorate | grep -i wip )
|
||||||
wips_n=$(echo "$wips" | wc -l)
|
wips_n=$(echo "$wips" | wc -l)
|
||||||
LOCKFILE=/tmp/githook.allow_wip
|
LOCKFILE="$PWD/.git/.githook.allow_wip"
|
||||||
|
|
||||||
|
# This checks if neither lockfile exists AND wips is non-empty
|
||||||
if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
|
if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
|
||||||
# Allows us to read user input below, assigns stdin to keyboard
|
# Allows us to read user input below, assigns stdin to keyboard
|
||||||
exec < /dev/tty
|
exec < /dev/tty
|
||||||
|
@ -14,7 +15,3 @@ if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
|
||||||
* ) echo -e "\naborting."; exit 1;;
|
* ) echo -e "\naborting."; exit 1;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# git-lfs stuff
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
|
|
||||||
git lfs pre-push "$@"
|
|
||||||
|
|
Loading…
Reference in New Issue