Commit b41d158a authored by Carl Schaffer's avatar Carl Schaffer
Browse files

Merge branch 'improve-get-git' into 'master'

improving get_git_revision preformance

See merge request !15
parents 6b4163e9 15eedf4e
Pipeline #3658 passed with stage
function get_git_revision
;get path to this file
source_path = file_dirname(file_search(strsplit(!path,':',/extract),'get_git_revision.pro'))
;get path to this file, iterate through all folders on path,
;skip working directory as it could be very large
foreach folder, strsplit(!path,':',/extract) do begin
if folder eq '.' then continue
cnt=0
paths = file_search(folder,'get_git_revision.pro',count=cnt,/fully_qualify_path)
if (cnt gt 0) then begin
source_path = FILE_DIRNAME(paths)
break
endif
endforeach
spawn,'cd '+source_path+ $
' ; ./git-create-revisioninfo-hook.sh',gitinfo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment