projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed129ae
)
cmake: Touch $GIT_DIR/logs/HEAD if it does not already exist.
author
Peter Collingbourne
<peter@pcc.me.uk>
Thu, 27 Apr 2017 17:04:05 +0000
(17:04 +0000)
committer
Peter Collingbourne
<peter@pcc.me.uk>
Thu, 27 Apr 2017 17:04:05 +0000
(17:04 +0000)
Apparently some git tools (such as "repo") may not create this file.
Patch by Quentin Neill.
llvm-svn: 301565
llvm/include/llvm/Support/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/Support/CMakeLists.txt
b/llvm/include/llvm/Support/CMakeLists.txt
index
b4b9937
..
8250521
100644
(file)
--- a/
llvm/include/llvm/Support/CMakeLists.txt
+++ b/
llvm/include/llvm/Support/CMakeLists.txt
@@
-18,6
+18,10
@@
macro(find_first_existing_vc_file out_var path)
if(git_result EQUAL 0)
string(STRIP "${git_dir}" git_dir)
set(${out_var} "${git_dir}/logs/HEAD")
+ # some branchless cases (e.g. 'repo') may not yet have .git/logs/HEAD
+ if (NOT EXISTS "${git_dir}/logs/HEAD")
+ file(WRITE "${git_dir}/logs/HEAD" "")
+ endif()
else()
find_first_existing_file(${out_var}
"${path}/.svn/wc.db" # SVN 1.7