From b012ebfa79b48432f9ea50b16abd283029be07ca Mon Sep 17 00:00:00 2001 From: dearblue Date: Thu, 14 Jul 2022 21:58:20 +0900 Subject: [PATCH] Ignore git checkout if nil commit-hash If there is no `.lock` file and no commit hash specified, avoid `git checkout --detach`. This behavior will be the same as up to mruby-3.1. ref. #5638 --- lib/mruby/build/load_gems.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb index 24d5533c6..3de929bba 100644 --- a/lib/mruby/build/load_gems.rb +++ b/lib/mruby/build/load_gems.rb @@ -364,6 +364,7 @@ module MRuby end def git_checkout_dependency(repo_dir, commit, branch) + return unless commit @build.git.run_checkout_detach(repo_dir, commit) end end