github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/scripts/authors.sh (about)

     1  #! /bin/sh
     2  
     3  # This script produces the list of authors for a given source file,
     4  # listed in decreasing order of the number of commits by that author
     5  # that have touched the file.
     6  
     7  file=${1:?}
     8  
     9  git log --no-merges --format='%aN <%aE>' "$file" \
    10      | sort \
    11      | uniq -c \
    12      | sort -nr \
    13      | sed -e 's/^ *//g' \
    14      | cut -d' ' -f2- \
    15      | sed -e 's,^,// Author: ,g'