BigW Consortium Gitlab
Fix: Infinity Bug in Commit Statistics ## What does this MR do? It fixes a logic bug in the commits statistics: The code assumed that the amount of days involved in a commit range is equal to the difference between the first and last date. This is not true, though, as (from a human standpoint), a commit yesterday and a commit today involve two days, not one. Similarly, a fresh project with only commits made today already 'used' one day. Since the number of involved days used to be zero for new projects, the result for commits per day quite often amounted to `Infinity`… ## Are there points in the code the reviewer needs to double check? The test file. I hope it is up to the standards of GitLab. ## Why was this MR needed? The bug occurres especially for new users with their first project while exploring GitLab. ## What are the relevant issue numbers? This bug was reported as #1548. ## Screenshots (if relevant) See merge request !4231
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
backend | Loading commit data... | |
badge | Loading commit data... | |
bitbucket_import | Loading commit data... | |
ci | Loading commit data... | |
database | Loading commit data... | |
diff | Loading commit data... | |
Loading commit data... | ||
fogbugz_import | Loading commit data... | |
gfm | Loading commit data... | |
git | Loading commit data... | |
github_import | Loading commit data... | |
gitlab_import | Loading commit data... | |
gitorious_import | Loading commit data... | |
google_code_import | Loading commit data... | |
graphs | Loading commit data... | |
import_export | Loading commit data... | |
ldap | Loading commit data... | |
lfs | Loading commit data... | |
metrics | Loading commit data... | |
middleware | Loading commit data... | |
o_auth | Loading commit data... | |
saml | Loading commit data... | |
sanitizers | Loading commit data... | |
sherlock | Loading commit data... | |
sql | Loading commit data... | |
template | Loading commit data... | |
akismet_helper_spec.rb | Loading commit data... | |
asciidoc_spec.rb | Loading commit data... | |
auth_spec.rb | Loading commit data... | |
award_emoji_spec.rb | Loading commit data... | |
blame_spec.rb | Loading commit data... | |
build_data_builder_spec.rb | Loading commit data... | |
closing_issue_extractor_spec.rb | Loading commit data... | |
color_schemes_spec.rb | Loading commit data... | |
current_settings_spec.rb | Loading commit data... | |
database_spec.rb | Loading commit data... | |
exclusive_lease_spec.rb | Loading commit data... | |
git_access_spec.rb | Loading commit data... | |
git_access_wiki_spec.rb | Loading commit data... | |
highlight_spec.rb | Loading commit data... | |
incoming_email_spec.rb | Loading commit data... | |
key_fingerprint_spec.rb | Loading commit data... | |
lazy_spec.rb | Loading commit data... | |
markup_helper_spec.rb | Loading commit data... | |
metrics_spec.rb | Loading commit data... | |
note_data_builder_spec.rb | Loading commit data... | |
popen_spec.rb | Loading commit data... | |
project_search_results_spec.rb | Loading commit data... | |
push_data_builder_spec.rb | Loading commit data... | |
reference_extractor_spec.rb | Loading commit data... | |
regex_spec.rb | Loading commit data... | |
search_results_spec.rb | Loading commit data... | |
snippet_search_results_spec.rb | Loading commit data... | |
themes_spec.rb | Loading commit data... | |
upgrader_spec.rb | Loading commit data... | |
uploads_transfer_spec.rb | Loading commit data... | |
url_builder_spec.rb | Loading commit data... | |
url_sanitizer_spec.rb | Loading commit data... | |
version_info_spec.rb | Loading commit data... | |
workhorse_spec.rb | Loading commit data... |