diff options
| author | Hsieh Chin Fan <typebrook@topo.tw> | 2022-12-18 08:53:06 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <typebrook@topo.tw> | 2022-12-18 08:53:06 +0800 |
| commit | 1da0736d887b91d3ff20304fa56d99c4c8c343ff (patch) | |
| tree | 56538385b52ba0e2e4512c49376635a7bbd3f9a6 /tools | |
| parent | bf7b8c69807b75edae662a6957754dd3a7e1ed6b (diff) | |
In case git repo has no remote
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/git/check-repos.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/git/check-repos.sh b/tools/git/check-repos.sh index e6f3b6c..5180fc9 100755 --- a/tools/git/check-repos.sh +++ b/tools/git/check-repos.sh | |||
| @@ -28,7 +28,7 @@ while read repo remote; do | |||
| 28 | changes="$(git -c color.status=always status --short)" | 28 | changes="$(git -c color.status=always status --short)" |
| 29 | 29 | ||
| 30 | # Diff between from local repo and remote | 30 | # Diff between from local repo and remote |
| 31 | cherry="$(git cherry)" | 31 | cherry="$([ -n "`git remote`" ] && git cherry)" |
| 32 | 32 | ||
| 33 | if [[ $COUNT_ONLY == true ]]; then | 33 | if [[ $COUNT_ONLY == true ]]; then |
| 34 | # If '-n' is specified, only count repo with changes/local-diff | 34 | # If '-n' is specified, only count repo with changes/local-diff |