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,19 +2,16 @@
|
|||
# check for WIP commits
|
||||
wips=$(git log --oneline --no-decorate | grep -i wip )
|
||||
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
|
||||
# Allows us to read user input below, assigns stdin to keyboard
|
||||
exec < /dev/tty
|
||||
echo "contains $wips_n WIP commit(s)"
|
||||
read -p "Really push? (Y/N) " -n 1 -r
|
||||
case "$REPLY" in
|
||||
y|Y ) echo -e "\ncontinuing..."; touch $LOCKFILE;;
|
||||
* ) echo -e "\naborting."; exit 1;;
|
||||
esac
|
||||
# Allows us to read user input below, assigns stdin to keyboard
|
||||
exec < /dev/tty
|
||||
echo "contains $wips_n WIP commit(s)"
|
||||
read -p "Really push? (Y/N) " -n 1 -r
|
||||
case "$REPLY" in
|
||||
y|Y ) echo -e "\ncontinuing..."; touch $LOCKFILE;;
|
||||
* ) echo -e "\naborting."; exit 1;;
|
||||
esac
|
||||
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