Commit 0fa82acd authored by Fabio Pelosin's avatar Fabio Pelosin

[fix] Attempt to fix incorrect `pod list [DAYS]'

The command can picked a commit that was in a
branch and presented an overestimated number of new pods
as the branch may include the pods added to master
during its life time

The issues is recognizable by the following pattern
`$pod list 2' => shows 20 new pods
`$pod list 3' => shows a correct low number of new pods
parent b933c31d
......@@ -39,7 +39,7 @@ module Pod
end
def commit_from_days_ago (days)
Dir.chdir(dir) { git("rev-list -n1 --before=\"#{days} day ago\" master") }
Dir.chdir(dir) { git("rev-list -n1 --before=\"#{days} day ago\" --first-parent master") }
end
def spec_names_from_commit (commit)
......@@ -52,6 +52,9 @@ module Pod
result = dir_list.split("\n").uniq
result.delete('')
puts
puts commit.white
puts result.join(', ').magenta
result
end
......
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