]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: silence "You are in 'detached HEAD' state" warning 39826/head
authorKefu Chai <kchai@redhat.com>
Thu, 4 Mar 2021 10:25:33 +0000 (18:25 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Mar 2021 11:13:22 +0000 (19:13 +0800)
git warns us when the repo is in 'detached HEAD' state, like:

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in
this state without impacting any branches by switching back to a branch.
...
Turn off this advice by setting config variable advice.detachedHead to
false

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Buildpmem.cmake

index fc17baeaa821b19fe169d48536272652fea4aced..46a246b94e80c9d2690e67a64889d7d64dd21b0a 100644 (file)
@@ -18,6 +18,7 @@ function(build_pmem)
       GIT_REPOSITORY "https://github.com/ceph/pmdk.git"
       GIT_TAG "1.7"
       GIT_SHALLOW TRUE
+      GIT_CONFIG advice.detachedHead=false
       SOURCE_DIR ${CMAKE_BINARY_DIR}/src/pmdk
       CONFIGURE_COMMAND ""
       # Explicitly built w/o NDCTL, otherwise if ndtcl is present on the