Created
May 26, 2014 15:34
-
-
Save tsvayer/6bb0f361803c8b434eeb to your computer and use it in GitHub Desktop.
limit file size on windows hg commit
This file contains hidden or 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
| [hooks] | |
| precommit.bigfile = hg diff | powershell -c "$input |?{$_.StartsWith('diff')}| %{$_.Split(' ')[3]}| %{if((gi $_).length -ge 1000000){ write-host $_ ":" (gi $_).length "bytes, must be less than 1Mb"; exit 1;}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment