From ba0dc8e491b6b202e0e407a07169804d9bdb0143 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 19 Jul 2017 16:30:14 +0200 Subject: bin/common-functions: add shortcut if only one revision is to be sorted --- bin/common-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin') diff --git a/bin/common-functions b/bin/common-functions index baf5750..938c18a 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -503,6 +503,16 @@ find_newest_of_git_revisions() { local repo revisions="$(cat)" + if [ $( + echo "${revisions}" | \ + wc -l + ) -eq 1 ]; then + + echo "${revisions}" + return + + fi + repo="$( find_repository_with_commit \ "$( -- cgit v1.2.3-70-g09d2