1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use already fetched pull request [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2019-08-11 15:42:16 +09:00
parent 1c7eadf754
commit 51d9d0f888
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
Notes: git 2019-08-31 04:40:14 +09:00

View file

@ -177,7 +177,10 @@ define fetch-github
git -C "$(srcdir)" remote add github $(GITHUB_RUBY_URL); \
$(eval REMOTE_GITHUB_URL := $(GITHUB_RUBY_URL)) \
)
git -C "$(srcdir)" fetch -f github "pull/$(1)/head:gh-$(1)"
$(if $(git -C "$(srcdir)" log -1 --oneline "github/pull/$(1)/head" 2> /dev/null), \
git -C "$(srcdir)" branch -f "gh-$(1)" "github/pull/$(1)/head", \
git -C "$(srcdir)" fetch -f github "pull/$(1)/head:gh-$(1)" \
)
endef
.PHONY: checkout-github