From 7f8e88d1888b3bdf555b938f34a91e1bba60db7c Mon Sep 17 00:00:00 2001 From: Danny Thomas Date: Wed, 24 Jun 2020 14:40:16 -0700 Subject: [PATCH] Avoid git status call for strategy selection unless required --- .../nebula/plugin/release/git/semver/SemVerStrategy.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/groovy/nebula/plugin/release/git/semver/SemVerStrategy.groovy b/src/main/groovy/nebula/plugin/release/git/semver/SemVerStrategy.groovy index 19b65f2..98d8470 100644 --- a/src/main/groovy/nebula/plugin/release/git/semver/SemVerStrategy.groovy +++ b/src/main/groovy/nebula/plugin/release/git/semver/SemVerStrategy.groovy @@ -131,8 +131,7 @@ final class SemVerStrategy implements DefaultVersionStrategy { logger.info('Skipping {} strategy because repo is dirty.', name) return false } else { - String status = grgit.status().clean ? 'clean' : 'dirty' - logger.info('Using {} strategy because repo is {} and stage ({}) is one of: {}', name, status, stage, stages) + logger.info('Using {} strategy because repo is not dirty (or allowed to be dirty) and stage ({}) is one of: {}', name, stage, stages) return true } }