lib/ohloh_scm/adapters/git/misc.rb in ohloh_scm-2.2.7 vs lib/ohloh_scm/adapters/git/misc.rb in ohloh_scm-2.2.8
- old
+ new
@@ -77,9 +77,10 @@
def tags
return [] if no_tags?
tag_strings = run("cd #{url} && git tag --format='%(creatordate:iso-strict) %(objectname) %(refname)'").split(/\n/)
tag_strings.map do |tag_string|
timestamp_string, commit_hash, tag_path = tag_string.split(/\s/)
+ timestamp_string = '1970-01-01' if timestamp_string.strip.empty?
timestamp = Time.parse(timestamp_string)
tag_name = tag_path.gsub('refs/tags/', '')
[tag_name, commit_hash, timestamp]
end
end