From 5e645e1489394ff05eb98c31ff9445ff7de007e4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 7 Jan 2021 05:06:11 -0500 Subject: [PATCH] fix: use correct method to detect if a repo is empty --- plugins/git/internal-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index c3f4f6a6d..d9156e7bc 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -193,7 +193,7 @@ fn-git-clone() { local APP_ROOT="$DOKKU_ROOT/$APP" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" - if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then + if [[ "$(git -C "$APP_ROOT" count-objects)" != "0 objects, 0 kilobytes" ]]; then dokku_log_fail "The clone subcommand can only be executed for new applications" fi