Limiting file size in git repository

前端 未结 11 1515
星月不相逢
星月不相逢 2020-12-02 14:55

I\'m currently thinking of changing my VCS (from subversion) to git. Is it possible to limit the file size within a commit in a git repository? For e. g. subversion there is

11条回答
  •  天涯浪人
    2020-12-02 15:11

    I am using gitolite and the update hook was already being used - instead of using the update hook, I used the pre-receive hook. The script posted by Chriki worked fabulously with the exception that the data is passed via stdin - so I made one line change:

    - refname=$3
    + read a b refname
    

    (there may be a more elegant way to do that but it works)

提交回复
热议问题