2010-09-02 08:20:45 +00:00
|
|
|
def gitmtime
|
|
|
|
filepath=@item.path.sub('/Scratch/','content/html/').sub(/\/$/,'')
|
2010-09-02 09:40:24 +00:00
|
|
|
filepath<<=%{.#{@item[:extension]}}
|
|
|
|
str=`git log -1 --format='%ci' -- #{filepath}`
|
2010-09-02 08:51:36 +00:00
|
|
|
if str == ""
|
|
|
|
return @item.mtime
|
|
|
|
else
|
|
|
|
return DateTime.parse( str )
|
|
|
|
end
|
2010-09-02 08:20:45 +00:00
|
|
|
end
|