[download]

local/bin/repos

   1 #!/bin/bash
   2 
   3 source ~/.bash/git-prompt.sh
   4 
   5 for i in "${@:-.}"; do
   6     pushd "$i" > /dev/null || continue
   7     find * -name .git 2>&- |  while read j; do
   8         j=$PWD/${j%/.git}
   9         pushd "$j" > /dev/null
  10 
  11         ct=$(git log -1 --format=%ct)
  12         cr=$(git log -1 --format=%cr)
  13         st=$(git status -s 2>&- | wc -l)
  14         up=$(git log --oneline --branches --not --remotes | wc -l)
  15 
  16         __git_ps1 "$ct\t${j/~/\~}\t%s\t*$up\t+$st\t($cr)\n"
  17         popd > /dev/null
  18     done
  19     popd > /dev/null
  20 done | sort -r | cut -f 2- | column -ts $'\t'