Closed
Description
I am building mruby with specified mgems. After performing rake deep_clean
and trying to build it again, I encounter a 'Remote branch HEAD not found in upstream origin' error, and the build fails.
From what I've investigated, it seems that the issue is caused by the branch name written in build_config.rb.lock changing from master to HEAD.
Reproduction Steps
I have placed the code to reproduce the issue on https://github.com/buty4649/mruby-remote-branch-bug. Please use this for reference.
- Clone the repository from https://github.com/buty4649/mruby-remote-branch-bug and move to that directory.
$ git clone https://github.com/buty4649/mruby-remote-branch-bug $ cd mruby-remote-branch-bug
- At this point, it is set to
branch: master
.$ grep branch build_config.rb.lock branch: HEAD
- Proceed with the build.
$ MRUBY_CONFIG=$(pwd)/build_config.rb MRUBY_BUILD_DIR=$(pwd)/build rake -f /path/to/mruby/Rakefile
- After the build completes, it changes to
branch: HEAD
.$ git diff | cat diff --git a/build_config.rb.lock b/build_config.rb.lock index db02184..642f97b 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -7,6 +7,6 @@ builds: host: https://github.com/mattn/mruby-json.git: url: https://github.com/mattn/mruby-json.git - branch: master + branch: HEAD commit: f99d9428025469f2400f93c53b185f65f963e507 version: 0.0.0
- Cleanup build directory.
$ MRUBY_CONFIG=$(pwd)/build_config.rb MRUBY_BUILD_DIR=$(pwd)/build rake -f /path/to/mruby/Rakefile deep_clean
- Try building again, and the issue should reproduce.
$ MRUBY_CONFIG=$(pwd)/build_config.rb MRUBY_BUILD_DIR=$(pwd)/build rake -f /path/to/mruby/Rakefile -- snip -- fatal: Remote branch HEAD not found in upstream origin rake aborted! Command failed with status (128): [git clone --recursive --branch "HEAD" "htt...] -- snip ---
Metadata
Metadata
Assignees
Labels
No labels