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

Re: [RFC/PATCH] config: add core.trustmtime

From
Torsten Bögershausen <tboegi@web.de>
Date
Dec 1, 2015, 05:57 UTC
Message-ID
<565D36B1.9050104@web.de>
In-Reply-To
<xmqq610j8fzt.fsf@gitster.mtv.corp.google.com>
On 11/30/2015 08:05 PM, Junio C Hamano wrote:
Show 12 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> Maybe I'm missing some really common breakage with st_mtime on some
>> system, but having a feature the user explicitly enables turn itself
>> off and doing FS-testing that takes 10 seconds when it's enabled seems
>> like the wrong default to me.
>>
>> We don't do it with core.fileMode, core.ignorecase or core.trustctime
>> or core.symlinks. Do we really need to be treating this differently?
> I share the exact thought.  I was looking the other way when
> untracked-cache was done originally ;-), and I would also want to
> know the answers to the above questions.
Maybe somewhat off topic, but:

Create a repo under Linux: Linux will probe the FS and will set core.filemode true core.ignorecase false.

Export it using SAMBA to Windows or Mac OS X. In some magical way the mounted repo becomes case-insensitive under both Mac and Windows, even if core.ignorecase is true in the config file.

Same for filemode: (Git for Windows doesn't see the execute bit at all, but relies on core.filemode anyway) Depending how the repo is mounted on the Mac, the execute bits may work, be always 0 or always 1.

Relying on this kind of config files is not ideal in a networked environment. It is not ideal when different implementations of Git access the same repo, (Git for Windows vs cygwin vs Egit/Jgit)

So I think that the original patch could make Git unreliable under some circumstances.

And some day I may send a patch which does a quick auto-probe for filemode and ignorecase, to adjust Git to what the underlying "local OS - network - remote OS - remote FS" really achieves.

Previous: Duy NguyenNext: Duy Nguyen
Message 9 of 13 in “config: add core.trustmtime”
  1. config: add core.trustmtimeChristian Couder, Nov 25, 2015
  2. Ævar Arnfjörð BjarmasonNov 25, 2015
  3. Duy NguyenNov 25, 2015
  4. Christian CouderNov 26, 2015
  5. Duy NguyenNov 26, 2015
  6. Ævar Arnfjörð BjarmasonNov 27, 2015
  7. Junio C HamanoNov 30, 2015
  8. Duy NguyenNov 30, 2015
  9. Torsten BögershausenDec 1, 2015
  10. Duy NguyenDec 2, 2015
  11. Christian CouderDec 7, 2015
  12. Johannes SchindelinNov 25, 2015
  13. Christian CouderNov 25, 2015

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.