git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?

Previous: Dimitar BonevNext: Junio C Hamano
Message 4 of 10 in “Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state”
  1. Dimitar BonevMay 4, 2013
  2. Thomas RastMay 4, 2013
  3. Dimitar BonevMay 4, 2013
  4. Jonathan NiederMay 4, 2013
  5. Junio C HamanoMay 4, 2013
  6. Junio C HamanoMay 4, 2013
  7. Dimitar BonevMay 4, 2013
  8. Thomas RastMay 6, 2013
  9. Junio C HamanoMay 6, 2013
  10. Dimitar BonevMay 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.