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 stdin encoding for Git... again #96

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Fix stdin encoding for Git... again #96

merged 1 commit into from
Oct 23, 2024

Conversation

dfederm
Copy link
Member

@dfederm dfederm commented Oct 22, 2024

Well, I thought wrapping the underlying stream with a writer with another encoder would work (see #84), but it appears that Process sets AutoFlush, which immediately writes that encoding's preamble (the BOM in this case) to the stream.

After a bunch of trial and error, I couldn't figure out a way to start a process using Process without writing a BOM to stdin, so decided to just completely copy/paste the Process class and customize it, which really is a terrible workaround. I did remove a bunch of the unused features though to save a few thousand lines of copy/pasted code from .NET Framework, but it's still a pretty huge amount of copy/paste.

Oh well, I guess it works.

@KalleOlaviNiemitalo
Copy link

Yeah, I mentioned AutoFlush in #84 (comment). But if #89 did not fix the bug, why were the PR checks all green; does this need a new test?

@dfederm dfederm merged commit 2eb4fd6 into main Oct 23, 2024
6 checks passed
@dfederm dfederm deleted the fix-git-enc branch October 23, 2024 16:29
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.

3 participants