File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,15 @@ function executBulkOp () {
133133 eval cd " \" $rwsdir \" "
134134 local actual=$( pwd)
135135 [ " ${quiet?} " != " false" ] && echo 1>&2 " Executing bulk operation in workspace ${inverse} $actual ${reset} "
136- eval find -L . -name " .git" | while read line; do
136+
137+ allGitFolders=( $( eval find -L . -name " .git" ) )
138+
139+ for line in ${allGitFolders[@]} ; do
137140 local gitrepodir=${line:: ${# line} -5} # cut the .git part of find results to have the root git directory of that repository
138141 eval cd " \" $gitrepodir \" " # into git repo location
139142 local curdir=$( pwd)
140143 local leadingpath=${curdir# ${actual} }
141- [ " ${quiet?} " != " false" ] && echo 1>&2 " Current repository: ${leadingpath%/* } /${bldred}${curdir##*/ }${reset} "
144+ [ " ${quiet?} " != " false" ] && echo 1>&2 " Current repository: ${leadingpath%/* } /${bldred}${curdir##*/ }${reset} "
142145 guardedExecution " $@ "
143146 eval cd " \" $rwsdir \" " # back to origin location of last find command
144147 done
Original file line number Diff line number Diff line change 4444if [ -n " $SUMMARY_BY_LINE " ]; then
4545 paths=( " $@ " )
4646else
47- commit=" "
48- test $# -ne 0 && commit=$*
47+ commit=" HEAD "
48+ [ $# -ne 0 ] && commit=$*
4949fi
5050project=${PWD##*/ }
5151
@@ -191,13 +191,14 @@ if [ -n "$SUMMARY_BY_LINE" ]; then
191191 echo " authors :"
192192 lines " ${paths[@]} " | sort | uniq -c | sort -rn | format_authors
193193else
194-
195194 echo " repo age : $( repository_age) "
196195 # shellcheck disable=SC2086
197196 echo " active : $( active_days $commit ) days"
198197 # shellcheck disable=SC2086
199198 echo " commits : $( commit_count $commit ) "
200- if test " $commit " = " " ; then
199+
200+ # The file count doesn't support passing a git ref so ignore it if a ref is given
201+ if [ " $commit " == " HEAD" ]; then
201202 echo " files : $( file_count) "
202203 fi
203204 echo " authors : "
You can’t perform that action at this time.
0 commit comments