Commit 15eedf4e authored by Carl Schaffer's avatar Carl Schaffer
Browse files

improving get_git_revision preformance

parent 6b4163e9
function get_git_revision function get_git_revision
;get path to this file ;get path to this file, iterate through all folders on path,
source_path = file_dirname(file_search(strsplit(!path,':',/extract),'')) ;skip working directory as it could be very large
foreach folder, strsplit(!path,':',/extract) do begin
if folder eq '.' then continue
paths = file_search(folder,'',count=cnt,/fully_qualify_path)
if (cnt gt 0) then begin
source_path = FILE_DIRNAME(paths)
spawn,'cd '+source_path+ $ spawn,'cd '+source_path+ $
' ; ./',gitinfo ' ; ./',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