Skip to content

Commit 2c6ac1e

Browse files
committed
FIX: get-git function used to collect information about current commit during compilation
1 parent 2ecef2f commit 2c6ac1e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/tools/make-boot.r

+10-7
Original file line numberDiff line numberDiff line change
@@ -755,20 +755,23 @@ at-value: func ['field] [next find boot-sysobj to-set-word field]
755755

756756
get-git: function[][
757757
git: none
758-
if exists? dir: %../../.git/ [
758+
if any [
759+
exists? git-dir: %../../.git/
760+
exists? git-dir: %../../../.git/
761+
][
762+
?? git-dir
759763
try [
760-
ls/l/r/i dir #" " ;@@ for checking how it looks in travis environment
761-
git-head: read/string dir/HEAD
764+
git-head: read/string git-dir/HEAD
762765
?? git-head
763766
parse git-head [thru "ref:" any #" " copy git-head to lf]
764767
git: object [
765768
repository: none
766-
branch: find/reverse/tail tail probe git-head #"/"
767-
commit: trim/tail read/string dir/(git-head)
768-
message: trim/tail read/string dir/COMMIT_EDITMSG
769+
branch: find/reverse/tail tail git-head #"/"
770+
commit: trim/tail read/string git-dir/(git-head)
771+
message: trim/tail read/string git-dir/COMMIT_EDITMSG
769772
]
770773
try [
771-
git/repository: trim/tail read/string dir/description
774+
git/repository: trim/tail read/string git-dir/description
772775
]
773776
?? git
774777
]

0 commit comments

Comments
 (0)