summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-19 16:30:14 +0200
committerErich Eckner <git@eckner.net>2017-07-19 16:30:14 +0200
commitba0dc8e491b6b202e0e407a07169804d9bdb0143 (patch)
treeb71e309e5f259555973671e405e6e889939c95f2 /bin
parenta381a6e5fc064a4658bc24ce06c7c1f8907efe7b (diff)
downloadbuilder-ba0dc8e491b6b202e0e407a07169804d9bdb0143.tar.xz
bin/common-functions: add shortcut if only one revision is to be sorted
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common-functions10
1 files changed, 10 insertions, 0 deletions
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 \
"$(