Commit a2e7b0ac authored by tywldx's avatar tywldx

log

parent c90c438d
......@@ -2,9 +2,13 @@
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
echo "$changed_files"
check_run() {
havefile=`echo "$changed_files" | grep "$1"`
echo "------check git change key file------"
echo "$havefile"
if [[ -n "${havefile}" ]];then
eval "$2"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment