Re: [PATCH 0/2] Respecting core.autocrlf when showing objects
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 11, 2008, 19:06 UTC
- Message-ID
- <alpine.DEB.1.00.0806112000400.1783@racer>
- In-Reply-To
- <484F6A27.1040602@trolltech.com>
Hi,
On Wed, 11 Jun 2008, Marius Storm-Olsen wrote:
Show 8 quoted lines
> Well, consider this: > > Say you are merging two branches, and know that you want to just use the > parts which conflict from the branch being merged in. Then you simply > do: > > git merge side > git show :3:file.txt > file.txt
This is not really how I would do things. I would do
git checkout side file.txt here.
The _point_ is: "git show" is supposed to show you the contents _in the repository_. For example, no smudge/clean filters will be heeded, and neither other attributes.
Further, "git show" will work without any problems in any bare repository.
In other words: "git show" is _not_ an operation on a working directory.
"git checkout" is. So use that instead.
> Given that 'git show' *is* porcelain, I'd expect it to work 'naturally' > in my workflow, and not dump raw object store content.
Do not confuse porcelain with "works on the working directory".
> The fact that the stage files are in the index doesn't matter. I'd want > CRLF files from 'git show v1.5.6-rc0:builtin-log.c' as well.
But it _does_ matter!
The index works on raw objects, not on smudged files. Period.
Ciao, Dscho