Correct refspec to fetch Ruby source #184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
git fetch master:master
means synchronization of the remotemaster
with the localmaster
. If the localmaster
isHEAD
, Git will also try to update the file tree, but it is refused by default. Thus, we may see the errors likefatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
.One of solutions is using
--update-head-ok
(-u
) flag. It enforces to update the file tree on fetchingHEAD
. However, it seems not good to me because the Rake task usesgit checkout
after thisgit fetch
so the file system updation on fetch is unnecessary.Another solution, by using this, is correcting refspec so that destination part becomes
origin
. Presumably, this is the canonical fix method.I'm not sure why the CI have been passed. Maybe GitHub returns a different (optimized) response on CI.