Re: Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 4, 2013, 18:48 UTC
- Message-ID
- <20130504184857.GC25863@elie.Belkin>
- In-Reply-To
- <CADeMBopNestsZT4maGr3+tdOBf_Q0ukUbRCbXyucOiZZeHx6nQ@mail.gmail.com>
Dimitar Bonev wrote:
Show 5 quoted lines
> @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?