From d21616eeb0616095bb96408036a7548a30987e02 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 16 Aug 2019 01:45:00 +0900 Subject: [PATCH] Clean up temporary git resources after `make update-github` --- defs/gmake.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/defs/gmake.mk b/defs/gmake.mk index 2436d37bc3..231977d599 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -203,8 +203,10 @@ update-github: fetch-github git -C "$(srcdir)" worktree add $(notdir $(GITHUB_UPDATE_WORKTREE)) "gh-$(PR)" git -C "$(GITHUB_UPDATE_WORKTREE)" merge master --no-edit @$(BASERUBY) -e 'print "Are you sure to push this to PR=$(PR)? [Y/n]: "; exit(gets.chomp == "n" ? 1 : 0)' - git -C "$(GITHUB_UPDATE_WORKTREE)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git + git -C "$(srcdir)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git git -C "$(GITHUB_UPDATE_WORKTREE)" push fork-$(PR) gh-$(PR):$(PR_BRANCH) + git -C "$(srcdir)" remote rm fork-$(PR) + git -C "$(srcdir)" worktree remove --force $(GITHUB_UPDATE_WORKTREE) .PHONY: pull-github pull-github: fetch-github