From: Oleg Broytman Date: Fri, 25 Jul 2014 13:59:23 +0000 (+0400) Subject: Configure maxlines X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=8dc4a48fff57a1db84a64dd50924776f3ba15e9a;p=git-scripts.git Configure maxlines --- diff --git a/configure-sf b/configure-sf index cd3df5a..5f08c21 100755 --- a/configure-sf +++ b/configure-sf @@ -3,7 +3,7 @@ # Origin: http://blog.gorwits.me.uk/index.html%3Fp=529.html if [ -z "$3" ]; then - echo "Usage: $0 PROJECTNAME REPONAME MLIST [prefix]" >&2 + echo "Usage: $0 PROJECTNAME REPONAME MLIST [prefix [maxlines]]" >&2 exit 1 fi @@ -11,6 +11,7 @@ PROJECTNAME="$1" REPONAME="$2" MLIST="$3" prefix="$4" +maxlines="$5" cd /home/git/p/"$PROJECTNAME/$REPONAME".git && echo "$PROJECTNAME git repository ($REPONAME)" > description @@ -23,7 +24,9 @@ chmod +x hooks/post-receive-user && #chmod g+w hooks/post-receive-user && git config hooks.diffopts "--stat --summary --find-copies-harder -p" -git config hooks.emailmaxlines 500 && +if [ -n "$maxlines" ]; then + git config hooks.emailmaxlines "$maxlines" && +fi && if [ -n "$prefix" ]; then git config hooks.emailprefix "$prefix" fi &&