Re: core.autocrlf, was Re: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.9.3
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 24, 2016, 16:45 UTC
- Message-ID
- <xmqq37luru7z.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.20.1608241743460.4924@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
>> In any case, in the ideal future, I would imagine that we would want >> to have "cat-file blob" to enable "--filters" by default; that would >> make cat-file and hash-objects a pair of symmetric operations. > > I would advocate against that. It is not like the terms "hash-object" and > "cat-file" even *look* like they are opposites.
I do not quite understand your objection.
hash-object is "I have data somewhere on the filesystem, and I want to store it in the object store even though I am not ready to add it to the index yet (or I may not even add it to the index ever), just to make it available to Git tools". cat-file is "I have data in the object store, I want to make it available to my other tools that understand data stored on the filesystem."
When we taught "--no-filters" to "hash-object" back in 2008, we should have realized that "cat-file :path >path" would want to be a way to do "checkout path" (with "--no-filters" option to allow us to inspect the "canonical version"), but we didn't.
Yes, correcting ancient mistakes is costly. Such is life.