Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ensure that completely ignored diff is empty#5893

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 2 commits intomainfromethomson/diff_fail
Feb 22, 2024
Merged

Conversation

ethomson
Copy link
Member

When all contents of a diff are ignored, the resulting buffer should be empty but is instead malformed (includes a header but no hunks).

(This adds a failing test only at this point.)

extrawurst reacted with eyes emoji
When a diff has no content -- for example, when there are onlywhitespace changes, and they're being ignored -- we need to avoidprinting the file header. Queue the file header update until the firsthunk is printed, and display it then.
@carlosmn
Copy link
Member

It looks like this broke the tests athttps://github.com/libgit2/rugged/blob/57257cbb7ea4b40debf5ec244e27ebffeaf40b16/test/diff_test.rb#L921 where we're just asking for the patch header. It looks like waiting to generate the patch header until we try to generate the content doesn't work if we never even wanted to generate any of the content but do want the header.

@ethomson
Copy link
MemberAuthor

@carlosmn bleh. I suppose that instead of delaying sending the header until we send the first piece of content, we need to go find the first piece of content, and if there is some, enqueue it and deliver the header.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethomson@carlosmn

[8]ページ先頭

©2009-2025 Movatter.jp