From 37f64de29f3d310ceef4b391f216cf04b4bd08f3 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 11 Jun 2018 18:46:20 +0100 Subject: [PATCH] gem5: prefix woktree branch with wt/ --- README.adoc | 4 +++- build | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 5c09b3f..90ab3b2 100644 --- a/README.adoc +++ b/README.adoc @@ -6537,13 +6537,15 @@ Since we control the gem5 build however, unlike Linux which uses Buildroot, we m It works like this: * when you don't pass the `-M` option, which is the same as the `-M default` variant, we use the source code from under the `gem5/gem5` submodule for the build -* otherwise, if you pass `-M some-branch`, we generate a git worktree checkout under `data/gem5/some-branch`. +* otherwise, if you pass `-M some-branch`, we generate a git worktree checkout under `data/gem5/some-branch`, with branch name `wt/some-branch`. + The initial revision for that worktree is whatever `gem5/gem5` is currently points to. + However, if the worktree already exists, we leave it untouched. + Therefore, you can safely go to that directory and edit the source there without fear that it will get deleted. ++ +The `wt/` branch name prefix stands for `WorkTree`, and is done to allow us to checkout to a test `some-branch` branch under `gem5/gem5` and still use `-M some-branch`, without a conflict for the worktree branch. All build outputs end up at: `out/common/gem5/` regardless. diff --git a/build b/build index 10f07c6..2576bd3 100755 --- a/build +++ b/build @@ -196,7 +196,7 @@ ln -s "$common_linux_variant_dir" "$common_linux_custom_dir" # Manage gem5 variants. if "$gem5"; then if [ ! -e "${common_gem5_src_dir}/.git" ]; then - git -C "$common_gem5_default_src_dir" worktree add -b "${common_gem5_variant}" "${common_gem5_src_dir}" + git -C "$common_gem5_default_src_dir" worktree add -b "wt/${common_gem5_variant}" "${common_gem5_src_dir}" fi fi