Re: [PATCH 0/2] Respecting core.autocrlf when showing objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 11 Jun 2008, Marius Storm-Olsen wrote:

> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux