mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
After some discussion on Discord yesterday, Emily floated this idea to have a check that fails if `Cargo.lock` has too many dependencies, where "too many" means "more than a random number I made up and sounds good." This implements that, as a non-required check, and to do so it invokes the power of an extremely evil and annoying Dragon. We could also ask this Dragon to do other things too I suppose (pending future contract negotiations). Signed-off-by: Austin Seipp <aseipp@pobox.com>
39 lines
1.7 KiB
Bash
Executable file
39 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# This script invokes the forbidden power of an ancient evil in order to defend
|
|
# the one thing we hold most dear: bureaucratic norms
|
|
|
|
# Many thanks to Phabricator (and Evan) for the vintage ASCII art (Apache 2.0)
|
|
# <https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/scripts/repository/commit_hook.php#L203>
|
|
|
|
rejection_reason=${1:-"No reason provided. The Dragons have spoken."}
|
|
|
|
cat >&2 <<'EOF'
|
|
+---------------------------------------------------------------+
|
|
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
|
|
+---------------------------------------------------------------+
|
|
\
|
|
\ ^ /^
|
|
\ / \ // \
|
|
\ |\___/| / \// .\
|
|
\ /V V \__ / // | \ \ *----*
|
|
/ / \/_/ // | \ \ \ |
|
|
@___@` \/_ // | \ \ \/\ \
|
|
0/0/| \/_ // | \ \ \ \
|
|
0/0/0/0/| \/// | \ \ | |
|
|
0/0/0/0/0/_|_ / ( // | \ _\ | /
|
|
0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\.-~ / /
|
|
,-} _ *-.|.-~-. .~ ~
|
|
* \__/ `/\ / ~-. _ .-~ /
|
|
\____(Oo) *. } { /
|
|
( (..) .----~-.\ \-` .~
|
|
//___\\\\ \ DENIED! ///.----..< \ _ -~
|
|
// \\\\ ///-._ _ _ _ _ _ _{^ - - - - ~
|
|
|
|
EOF
|
|
cat >&2 <<EOF
|
|
$rejection_reason
|
|
|
|
EOF
|
|
|
|
exit 1
|