Title: blame_git: fix coalescing step never being executed by pks-t · Pull Request #4580 · libgit2/libgit2 · GitHub
Open Graph Title: blame_git: fix coalescing step never being executed by pks-t · Pull Request #4580 · libgit2/libgit2
X Title: blame_git: fix coalescing step never being executed by pks-t · Pull Request #4580 · libgit2/libgit2
Description: Since blame has been imported from git.git and had its first share of refactorings in b6f60a4 (Clean up ported code, 2013-09-21), the code is actually not doing the coalescing step of the generated blame. While the code to do the coalescing does exist, it is never being called as the function git_blame__like_git will directly return from its while (true) loop. The function that was being imported from git.git was the assign_blame function from "builtin/blame.c" from 717d1462b (git-blame --incremental, 2007-01-28), which hasn't really changed much. Upon taking an initial look, one can seet hat coalesce is actually never getting called in assign_blame, as well, so one may assume that not calling coalesce by accident is actually the right thing. But it is not, as coalesce is being called ever since cee7f245d (git-pickaxe: blame rewritten., 2006-10-19) after the blame has been done in the caller of assign_blame. Thus we can conclude the code of libgit2 is actually buggy since forever. To fix the issue, simply break out of the loop instead of doing a direct return. Note that this does not alter behaviour in any way visible to our tests, which is unfortunate. But in order to not diverge from what git.git does, I'd rather adapt to how it is being done upstream in order to avoid breaking certain edge cases than to just remove that code.
Open Graph Description: Since blame has been imported from git.git and had its first share of refactorings in b6f60a4 (Clean up ported code, 2013-09-21), the code is actually not doing the coalescing step of the generated...
X Description: Since blame has been imported from git.git and had its first share of refactorings in b6f60a4 (Clean up ported code, 2013-09-21), the code is actually not doing the coalescing step of the generated...
Opengraph URL: https://github.com/libgit2/libgit2/pull/4580
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:135fd561-5889-56a1-147c-18a6c63aae8f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DDC0:2E83F4:54C9C26:71028D0:6A5DC5D6 |
| html-safe-nonce | 20fc7c9ebc9388ed54ca260aeb70101683c18c60ed70a2bf026e13b5d9dc4515 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREMwOjJFODNGNDo1NEM5QzI2OjcxMDI4RDA6NkE1REM1RDYiLCJ2aXNpdG9yX2lkIjoiMjA0MTIzMTY3NzkxNDQ2NTc1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d73659e1aff541e654e4fdf9becd89d72e7efbb7d2d4d27062075b918bb332b7 |
| hovercard-subject-tag | pull_request:175515870 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/libgit2/libgit2/pull/4580/files |
| twitter:image | https://avatars.githubusercontent.com/u/4056630?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4056630?s=400&v=4 |
| og:image:alt | Since blame has been imported from git.git and had its first share of refactorings in b6f60a4 (Clean up ported code, 2013-09-21), the code is actually not doing the coalescing step of the generated... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 901662 |
| octolytics-dimension-repository_nwo | libgit2/libgit2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 901662 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width