(BSD compat) apparently 'wc -l' on BSD adds spaces in front

Larry was right.  It's probably easier to port a shell than a shell
script!
redis
Sitaram Chamarty 2012-05-27 05:56:55 +05:30
parent 8595303c82
commit d623388c9f
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ nf=
# count files against all the other commits in the system not just $oldsha
# (why? consider what is $oldtree when you create a new branch, or what is
# $oldsha when you update an old feature branch from master and then push it
count=`git log --name-only $nf --format=%n $newtree --not --all | grep . | sort -u | wc -l`
count=`git log --name-only $nf --format=%n $newtree --not --all | grep . | sort -u | perl -ne '}{print "$."'`
[[ $count -gt $max ]] && {
# count has been exceeded. If $9 was NO_SIGNOFF there's still a chance