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

update index mtime etc metadata

From
Joey Hess <id@joeyh.name>
Date
Dec 14, 2015, 20:44 UTC
Message-ID
<20151214204429.GA31013@kitenet.net>

Is there any available plumbing that can change the mtime etc metadata that is recorded in the index for a file, to user-provided values? Or, to force the current file stat metadata to be updated in the index?

I know, git update-index --refresh, but I have a case where that's too expensive. I'm using smudge filters; I know that the cleaned version of the file will be unchanged from what's in the index now and only the stat metadata will change, and so I want to avoid git update-index --refresh running the clean filter, which can be quite expensive for a large file.

At the moment I don't see a way to do it other than using eg libgit2 to update the appropriate fields in the index structure.

-- 
see shy jo
Next: Duy Nguyen
Message 1 of 2 in “update index mtime etc metadata”
  1. Joey HessDec 14, 2015
  2. Duy NguyenDec 15, 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.