mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
2nd try at issue #874.
The problem from issue #874 has another variant: If .git/logs/refs/heads/merge-2.067 exists then this ref is returned as hash value(!). This is plain wrong. Solution is again to look up `.git/packed-refs`.
This commit is contained in:
parent
3a6d7bad96
commit
7c835c2738
1 changed files with 0 additions and 3 deletions
|
@ -23,9 +23,6 @@ if(HEAD_CONTENTS MATCHES "ref")
|
|||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
set(HEAD_HASH "${HEAD_REF}")
|
||||
else()
|
||||
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
||||
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue