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

Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff

From
Jeff King <peff@peff.net>
Date
Mar 22, 2009, 07:46 UTC
Message-ID
<20090322074643.GA4826@coredump.intra.peff.net>
In-Reply-To
<7v63i281py.fsf@gitster.siamese.dyndns.org>
On Sun, Mar 22, 2009 at 12:18:33AM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> Ok.  Although I already queued the removal to 'pu' for tonight's pushout
> and it is way too late to revert that, I think I didn't have to remove the
> function.  The codepath that lets you cheat by borrowing from the checkout
> runs convert_to_git() when it borrows, and if you are seeing a meaningful
> optimization even with that overhead, perhaps it would be worth keeping.

I certainly haven't done exhaustive tests. Obviously the one I did was a bit contrived. I just think it makes sense to have numbers rather than saying "this probably doesn't do anything anymore".

Show 6 quoted lines
> While the purist in me says #1 above is the right argument to make for
> feeding "clean" version, I suspect that the textconv or extdiff tools more
> often are not made from scratch and ported across platforms than are
> cobbled up together out of tools the script writer finds on his platform.
> I suspect that Dscho's "a tempfile should look like a checkout" would be
> much friendlier to them in practice for this reason.

I think you and I have about the same feeling on this, then. As somebody who does not actually use smudge/clean filters at all, I am willing to defer to Dscho's opinion, which is based on practical experience.

Show 7 quoted lines
> > For some reason, with your patch the tempfiles are created with mode
> > 0005 for me (whereas they are usually 0505), which makes open() in the
> > called script unhappy.  Looking over the patch text, though, I have no
> > idea what change could be causing that.
> 
> Neither 0005 nor 0505 sounds correct to me; shouldn't they be 0600 or
> something like that?

Argh, sorry, of course I should have realized something was wrong with my baseline when I saw 0505. I was building on a half-finished WIP related to textconv, which obviously is broken. Sorry for the noise.

-Peff
Previous: Junio C HamanoNext: Sebastian Schuberth
Message 9 of 14 in “Respect core.autocrlf when preparing temporary files for external diff”
  1. Respect core.autocrlf when preparing temporary files for external diffJohannes Schindelin, Mar 21, 2009
  2. Michael J GruberMar 21, 2009
  3. Junio C HamanoMar 21, 2009
  4. Johannes SchindelinMar 21, 2009
  5. Junio C HamanoMar 22, 2009
  6. Junio C HamanoMar 22, 2009
  7. Jeff KingMar 22, 2009
  8. Junio C HamanoMar 22, 2009
  9. Jeff KingMar 22, 2009
  10. Sebastian SchuberthMar 22, 2009
  11. Junio C HamanoMar 22, 2009
  12. Sebastian SchuberthMar 22, 2009
  13. Junio C HamanoMar 22, 2009
  14. Junio C HamanoMar 23, 2009

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.