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

Re: core.autocrlf, was Re: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.9.3

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 25, 2016, 11:54 UTC
Message-ID
<alpine.DEB.2.20.1608251343300.4924@virtualbox>
In-Reply-To
<xmqq37luru7z.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 24 Aug 2016, Junio C Hamano wrote:
Show 15 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> 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".

That is not how I read it. I read "hash-object" as: "hash this object". There was not a thought in my mind that it would apply filters. Since that was so clear in my mind, I failed to understand that you do not consider it a design mistake to turn on --filters by default in hash-object.

I read "cat-file" just the same: concatenate files and print on the standard output. Now, it is confusing enough that it does not concatenate files in unless in batch mode, and it would be even more confusing if it started to behave as if the user had called "git checkout --dry-run <revision> -- <path>" (which does not exist, but for which I would understand the --filters default).

> Yes, correcting ancient mistakes is costly.  Such is life.

I was not talking about the cost of correcting mistakes. Running --filters is potentially very costly. Just so you understand what I am talking about: I have a report that says that checking out a sizeable worktree with core.autocrlf=true is 58% slower than with core.autocrlf=false. That is horrible. And it is a cost that is entirely born by Windows users.

In short: I think letting hash-object default to --filters was a mistake, and doing the same for cat-file would be a mistake, too.

Ciao, Dscho

Previous: Junio C HamanoNext: Torsten Bögershausen
Message 22 of 24 in “[ANNOUNCE] Git for Windows 2.9.3”
  1. Johannes SchindelinAug 13, 2016
  2. Junio C HamanoAug 13, 2016
  3. Johannes SchindelinAug 17, 2016
  4. Junio C HamanoAug 17, 2016
  5. Johannes SchindelinAug 18, 2016
  6. Duy NguyenAug 22, 2016
  7. Johannes SchindelinAug 23, 2016
  8. Michael J GruberAug 23, 2016
  9. Johannes SchindelinAug 23, 2016
  10. Johannes SchindelinAug 23, 2016
  11. Junio C HamanoAug 23, 2016
  12. Junio C HamanoAug 23, 2016
  13. Dakota HawkinsAug 24, 2016
  14. Git for Windows documentation, was Re: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.9.3Johannes Schindelin, Aug 24, 2016
  15. Dakota HawkinsAug 24, 2016
  16. Philip OakleyAug 24, 2016
  17. Johannes SchindelinAug 25, 2016
  18. Johannes SchindelinAug 24, 2016
  19. Junio C HamanoAug 24, 2016
  20. core.autocrlf, was Re: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.9.3Johannes Schindelin, Aug 24, 2016
  21. Junio C HamanoAug 24, 2016
  22. Johannes SchindelinAug 25, 2016
  23. Torsten BögershausenAug 25, 2016
  24. Johannes SchindelinAug 25, 2016

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.