]> git.phdru.name Git - git-scripts.git/commitdiff
Configure maxlines
authorOleg Broytman <phd@phdru.name>
Fri, 25 Jul 2014 13:59:23 +0000 (17:59 +0400)
committerOleg Broytman <phd@phdru.name>
Fri, 25 Jul 2014 13:59:23 +0000 (17:59 +0400)
configure-sf

index cd3df5a8ab4ecf247c665826783b6c4674a8dd35..5f08c21e2b3fb96677e3bdf44fa7c8d10db7de7b 100755 (executable)
@@ -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 &&