commit f7b32fb2ae274190985f981cdb616d786e6f53b7
parent 4f2260b6414f6290f66a6aea06f12ed56b568ca7
Author: Mirko <mko.ledda@gmail.com>
Date: Thu, 23 Apr 2020 11:39:31 +0200
parent 4f2260b6414f6290f66a6aea06f12ed56b568ca7
Author: Mirko <mko.ledda@gmail.com>
Date: Thu, 23 Apr 2020 11:39:31 +0200
comments cleanup
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md @@ -47,7 +47,7 @@ git-summary [options] path * **-l**: Local summary lookup. Checks only local changes which is faster as there is no need to fetch the remote. * **-d**: Deep lookup. Look for any git repos within the entire current directory tree. Can be slowish for large trees. * **-q**: Quiet mode. Only print outdated repos. -* **-s**: Sort the ouput. (Runs sequentially to avoid race conditions). +* **-s**: Sorted output. (Slower as it runs sequentially to avoid race conditions). ## Branch status Currently, `git-summary` does not list multiple branches per repo. However, for single repos [`git-branch-status`](https://github.com/bill-auger/git-branch-status) does this beautifully. @@ -64,4 +64,4 @@ A big thanks :metal: to the amazing people that contributed to the original vers Additional thanks go to: * [ruricolist](https://github.com/ruricolist) - Cygwin support and quiet mode. -* [romainreignier](https://github.com/romainreignier) and [tobiasw1](https://github.com/tobiasw1) - Sequencial mode and output sorting. +* [romainreignier](https://github.com/romainreignier) and [tobiasw1](https://github.com/tobiasw1) - Sorted output.
diff --git a/git-summary b/git-summary @@ -52,7 +52,7 @@ usage() { -q Print nothing for repos that are up to date. Also print a final tally. - -s Run sequentially, do not spawn multiple parallel background jobs + -s Sort the ouput. (Runs sequentially to avoid race conditions) path Path to folder containing git repos; if omitted, the current working directory is used. @@ -77,7 +77,7 @@ git_summary() { l) local_only=1 ;; # Will skip "git fetch" d) deeplookup=1 ;; q) quiet=1 ;; - s) sequential=1 ;; # run sequentially + s) sort=1 ;; # Sort the output esac done shift $((OPTIND-1)) @@ -108,10 +108,10 @@ git_summary() { local f for f in $repos ; do - if [ $sequential -eq 0 ] ; then - summarize_one_git_repo $f "$template" "$local_only" "$quiet" >&1 & # multiple bg jobs + if [ $sort -eq 0 ] ; then + summarize_one_git_repo $f "$template" "$local_only" "$quiet" >&1 & # parallelized - first come first served stdout else - summarize_one_git_repo $f "$template" "$local_only" "$quiet" >&1 # sequentially + summarize_one_git_repo $f "$template" "$local_only" "$quiet" >&1 # sequential - sorted stdout fi (( repo_count+=1 )) done
: nply/git-summary