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

Re: autoCRLF, git status, git-gui, what is the desired behavior?

From
MLMark Levedahl <mlevedahl@verizon.net>
Date
Feb 25, 2007, 23:55 UTC
Message-ID
<45E221F4.4080900@verizon.net>
In-Reply-To
<45E20BC2.3000305@verizon.net>
Mark Levedahl wrote:
Show 9 quoted lines
> Junio C Hamano wrote:
>> The size field among other fields is to cache the last lstat(2)
>> information so that later "is the path modified?" question can
>> be answered efficiently.  So the size should in general match
>> both blob and filesystem but on CRLF filesystems it is compared
>> against and updated with the data from the filesystem.  There
>> could be a subtle bug that when updating an index entry we might
>> be incorrectly storing the size of the blob, but I haven't
>> checked.

Never mind: I should have triggered off the observation that something was changing the file, but as far as I know git does not change the working directory on commit and the autoCRLF code does not introduce that "feature". My trusty old editor (visual slickedit) occasionally corrupts its macros and starts doing strange and wonderful things, always something I never saw before. In this case, I had foo open (absent crlf endings) in it and and the editor was apparently re-saving all of its files in the middle of my tests as I flipped between various windows. Killing the editor stopped the behavior, rebuilding all the macros from scratch got rid of the problem for good.

So, after all that, it appears that the index does reflect the size in the working repository and the problems I was having were nothing to do with git.

Sorry for the noise.
Mark
Previous: Mark LevedahlNext: Mark Levedahl
Message 7 of 11 in “autoCRLF, git status, git-gui, what is the desired behavior?”
  1. Mark LevedahlFeb 25, 2007
  2. Junio C HamanoFeb 25, 2007
  3. Junio C HamanoFeb 25, 2007
  4. Mark LevedahlFeb 25, 2007
  5. Junio C HamanoFeb 25, 2007
  6. Mark LevedahlFeb 25, 2007
  7. Mark LevedahlFeb 25, 2007
  8. Mark LevedahlFeb 25, 2007
  9. Shawn O. PearceFeb 26, 2007
  10. Junio C HamanoFeb 26, 2007
  11. Shawn O. PearceFeb 26, 2007

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.