fix: expand git-ref to the full commit sha

If using a branch, git commands that interact with worktrees may fail for newer versions of git.
This commit is contained in:
Jose Diaz-Gonzalez
2021-01-17 17:29:21 -05:00
parent d16ff7fa12
commit 3af1342a9b

View File

@@ -51,6 +51,7 @@ cmd-git-sync() {
if [[ "$FLAG" == "--build" ]]; then
if [[ -n "$GIT_REF" ]]; then
GIT_REF="$(git -C "/home/dokku/$APP" rev-parse "$GIT_REF")"
plugn trigger receive-app "$APP" "$GIT_REF"
else
plugn trigger receive-app "$APP"