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

Re: git checkout behaviour when only ctime of file changes

From
CVCristian Morales Vega <christian.morales.vega@gmail.com>
Date
Apr 19, 2021, 11:23 UTC
Message-ID
<CAOWQn3Qa68aWH8ztGAej=ctJDw4dkzuPQkkqo6Ydvn=13hV1vw@mail.gmail.com>
In-Reply-To
<a6a5bb81-9a86-8901-31dd-dc9c09da0a23@gmail.com>
On Mon, 19 Apr 2021 at 12:10, Bagas Sanjaya <bagasdotme@gmail.com> wrote:
Show 10 quoted lines
>
> On 19/04/21 16.11, Cristian Morales Vega wrote:
> > Basically after something updates the ctime of a file, a
> > "git checkout" can behave differently depending on whether a
> > "git update-index --refresh" has been run before or not.
> > _Maybe_ it could make sense for "git checkout" to always behave as if
> > "git update-index --refresh" had been run before? No idea really.
> I know that setting SELinux label can alter file ctime, but when
> I need to write the test that simulate file ctime update, do you
> know which Unix command can trigger that, beside SELinux tools?

I am no expert on SELinux and I'm not sure I understand the question. I know "chcon", from coreutils, can do the SELinux labeling/ctime update. You could use that when writing a test. There is an example on the fifth comment of JENKINS-65395. I know "docker run --volume <host-dir>:<container-dir>:rw,z" will do the same, at least if SELinux is enabled. Which is what triggers JENKINS-65395. Don't really know a lot more.

Previous: Bagas SanjayaNext: Junio C Hamano
Message 3 of 6 in “git checkout behaviour when only ctime of file changes”
  1. Cristian Morales VegaApr 19, 2021
  2. Bagas SanjayaApr 19, 2021
  3. Cristian Morales VegaApr 19, 2021
  4. Junio C HamanoApr 19, 2021
  5. brian m. carlsonApr 20, 2021
  6. Cristian Morales VegaApr 20, 2021

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.