5 hooks to prevent adding too big binary file 7 .gitconfig configuration : 10 hooks = crlf tab digraphs doxygen 12 example for 10MB limit : 16 All files are checked by default. To check only binary files, use the type option : 24 WARNING = (
'Attempt to commit or push too big file(s). ' 26 FILEWARN = (
' - %s, %s > %s')
32 check_all_files =
common.get_option(
'filesize-hook.type',
"all").strip().lower() !=
"binary" 46 too_big_files.append(f)
52 for f
in too_big_files:
def get_option(option, default, type="")