arzzen / git-quick-stats

▁▅▆▃▅ Git quick statistics is a simple and efficient way to access various statistics in git repository.
https://git-quick-stats.sh/
MIT License
6.29k stars 251 forks source link

Support multiple repositories #117

Open emexelem opened 3 years ago

emexelem commented 3 years ago

Describe the solution you'd like I have a large number of repositories and I would like to produce the contribution stats by author aggregated by multiple repositories. An additional parameter could be provided on the command line to find repositories, or provide the list of repositories directly using find and xargs git quick-stats --repositoriesList={}

treussart commented 3 years ago

Hi, I suggest using git-quick-stats with a script, example :

WORKING_DIR="$(dirname "$0")/"
cd "${WORKING_DIR}" || exit 1
mkdir -p "${WORKING_DIR}/results/"

export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines"
export _GIT_BRANCH="master"

for d in ~/git/*/; do
      cd "${d}" || true
      git-quick-stats --git-stats-by-branch >"${WORKING_DIR}/results/$(basename ${d}).txt"
done
linusnorton commented 10 months ago

That script is useful but I think it would still be nice to have it aggregate the statistics