Last active
December 22, 2015 11:28
-
-
Save bleach/6465482 to your computer and use it in GitHub Desktop.
This lives on our git server as /usr/local/bin/git and advises people where they went wrong when creating a new repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init | |
________________________________________ | |
/ Friends don't let friends run git init \ | |
\ without --shared / | |
---------------------------------------- | |
\ . . | |
\ / `. .' " | |
\ .---. < > < > .---. | |
\ | \ \ - ~ ~ - / / | | |
_____ ..-~ ~-..-~ | |
| | \~~~\.' `./~~~/ | |
--------- \__/ \__/ | |
.' O \ / / \ " | |
(_____, `._.' | } \/~~~/ | |
`----. / } | / \__/ | |
`-. | / | / `. ,~~| | |
~-.__| /_ - ~ ^| /- _ `..-' | |
| / | / ~-. `-. _ _ _ | |
|_____| |_____| ~ - . _ _ _ _ _> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Wrapper to stop people creating repos without the --shared option. | |
# So that there are fewer ragepunches. | |
YOUR_ACTUAL_GIT='/usr/bin/git' | |
if [ "$1" = 'init' ] && ! echo "$@" | egrep -q -- '[[:space:]]--shared([[:space:]]|$)' | |
then | |
cowsay -f stegosaurus \ | |
"Friends don't let friends run git init without --shared" | |
exit 999 | |
else | |
exec $YOUR_ACTUAL_GIT "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment