Skip pre-commit hooks in the git-sync cron job
This commit is contained in:
parent
a86f247bea
commit
11ab7e5afb
2 changed files with 15 additions and 1 deletions
14
.local/bin/hookless-git-sync
Executable file
14
.local/bin/hookless-git-sync
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#! /usr/bin/bash
|
||||||
|
|
||||||
|
git () {
|
||||||
|
case "$1" in
|
||||||
|
commit)
|
||||||
|
shift
|
||||||
|
command git commit --no-verify "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
command git "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
. "$(systemd-path user-state-private)"/git-sync/git-sync "$@"
|
||||||
|
|
@ -12,7 +12,7 @@ sync_repo () {
|
||||||
repo=$1
|
repo=$1
|
||||||
|
|
||||||
echo git-sync -s "${repo}"
|
echo git-sync -s "${repo}"
|
||||||
( cd "${repo}" && "$(systemd-path user-state-private)"/git-sync/git-sync -s sync )
|
( cd "${repo}" && "$(systemd-path user-binaries)"/hookless-git-sync -s sync )
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue