Skip to content

Conversation

@rimrul
Copy link
Member

@rimrul rimrul commented Jan 8, 2026

Our astextplain helper used to pass through empty files and plaintext with the an expected extension. When we changed it to work based on mimetype rather than a predefined list of extensions in #624, both those passthroughs got lost. Plaintext passthrough has been restored in #626, but passthrough of empty files is still missing. Restore this functionality.

This fixes git-for-windows/git#5977

@rimrul
Copy link
Member Author

rimrul commented Jan 8, 2026

/updpkgsums

Our astextplain helper used to pass through empty files and plaintext with the
an expected extension. WHen we changed it to work based on mimetype
rather than a predefined list of extensions in git-for-windows#624, both those passthroughs got
lost. Plaintext passthrough has been restored in git-for-windows#626, but passthrough
of empty files is still missing. Restore this functionality.

This fixes git-for-windows/git#5977

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
@rimrul rimrul force-pushed the astextplain-empty branch from 6d8b08b to f502a63 Compare January 8, 2026 18:48
@rimrul
Copy link
Member Author

rimrul commented Jan 8, 2026

/updpkgsums

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
@rimrul rimrul mentioned this pull request Jan 8, 2026
@rimrul rimrul marked this pull request as ready for review January 8, 2026 18:58
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dscho
Copy link
Member

dscho commented Jan 9, 2026

/deploy git-extra

@dscho
Copy link
Member

dscho commented Jan 9, 2026

/add relnote bug The astextplain tool (which is used by Git for Windows to generate diffs of .pdf and .doc files) used to handle empty files gracefully. This behavior is now reinstated.

github-actions bot pushed a commit that referenced this pull request Jan 9, 2026
The `astextplain` tool (which is used by Git for Windows to generate
diffs of `.pdf` and `.doc` files) used to handle empty files gracefully.
This behavior is [now
reinstated](#668).

Signed-off-by: gitforwindowshelper[bot] <gitforwindowshelper-bot@users.noreply.github.com>
@dscho dscho merged commit fbc511e into git-for-windows:main Jan 9, 2026
9 of 10 checks passed
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.

astextplain errors out on empty files

2 participants