moved windows hooks, git does not want to add .git, too lazy to fix hard way
This commit is contained in:
3
windows/logseq-gitea/hooks/post-commit
Normal file
3
windows/logseq-gitea/hooks/post-commit
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
git push origin main
|
||||
25
windows/logseq-gitea/hooks/pre-commit
Normal file
25
windows/logseq-gitea/hooks/pre-commit
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
# Pull before committing
|
||||
# Credential handling options:
|
||||
# - hardcode credentials in URL
|
||||
# - use ssh with key auth
|
||||
# - https://git-scm.com/docs/git-credential-store
|
||||
# - git credential helper on windows
|
||||
|
||||
# Redirect output to stderr, uncomment for more output for debugging
|
||||
# exec 1>&2
|
||||
|
||||
output=$(git pull --no-rebase)
|
||||
|
||||
# Handle non error output as otherwise it gets shown with any exit code by logseq
|
||||
if [ "$output" = "Already up to date." ]; then
|
||||
# no ouput
|
||||
exit 0
|
||||
else
|
||||
# probably error print it to screen
|
||||
echo "${output}"
|
||||
fi
|
||||
|
||||
git add -A
|
||||
Reference in New Issue
Block a user