From 179aa26f4fe19ceeb9eceb40e23f7b50d65d1b49 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 28 Oct 2021 13:14:31 +0900 Subject: Prune stale worktrees before checking out a new pull request [ci skip] --- defs/gmake.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'defs/gmake.mk') diff --git a/defs/gmake.mk b/defs/gmake.mk index e533396bae..dd25897054 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -233,6 +233,7 @@ define pull-github $(eval GITHUB_MERGE_BASE := $(shell git -C "$(srcdir)" log -1 --format=format:%H)) $(eval GITHUB_MERGE_BRANCH := $(shell git -C "$(srcdir)" symbolic-ref --short HEAD)) $(eval GITHUB_MERGE_WORKTREE := $(shell mktemp -d "$(srcdir)/gh-$(1)-XXXXXX")) + git -C "$(srcdir)" worktree prune git -C "$(srcdir)" worktree add $(notdir $(GITHUB_MERGE_WORKTREE)) "gh-$(1)" git -C "$(GITHUB_MERGE_WORKTREE)" rebase $(GITHUB_MERGE_BRANCH) $(eval COMMIT_GPG_SIGN := $(COMMIT_GPG_SIGN)) -- cgit v1.2.3