Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:57:08

Dimitar Bonev wrote:
@ThomasRast: 'git show HEAD:targetfile > targetfile' was proposed in
the both links that I provided in the email that your replied to, but
this introduces external dependency to the command interpreter to
output the file unmodified but not every interpreter does this.
PowerShell in particular modifies the encoding of the file
That would suggest that "git show" (along with similar commands like
"git diff") should learn an --output= option to avoid its output being
corrupted.  It doesn't leave me very happy.

Is there no way to convince PowerShell to treat the output of a
command as binary data with no particular encoding?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help