Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix whole-file changes being attributed to the wrong commit in "git log" output #1111

Merged
merged 2 commits into from
Jun 22, 2022
Merged

Fix whole-file changes being attributed to the wrong commit in "git log" output #1111

merged 2 commits into from
Jun 22, 2022

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Jun 21, 2022

The pending buffer for whole-file changes is currently only flushed when
encountering a new diff header. This leads to it being carried over
across commit boundaries in cases where multiple commits are shown. To
fix this, we simply need to flush the buffered data on a commit
boundary as well.

Fixes #1089

I've also amended the testsuite to be run via cargo t, I hope that's ok :-)

The test_process_calling_cmdline test only allows "cargo test" and
"cargo tarpaulin" for running the testsuite, for "cargo t" is a
built-in alias for "cargo test" and should be allowed, too.
…og" output

The pending buffer for whole-file changes is currently only flushed when
encountering a new diff header. This leads to it being carried over
across commit boundaries in cases where multiple commits are shown. To
fix this, we simply need to flush the buffered data on a commit
boundary as well.

Fixes #1089
@dandavison
Copy link
Owner

Thanks again, I'm happy to see there's a one-line fix for this, despite the diff-header handling code having become a bit complicated.

@dandavison dandavison merged commit bd54a51 into dandavison:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 File removal attributed to wrong commit in git log
2 participants