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

[RFC PATCH 0/1] invalid outdated temporary files

From
HXHan Xin <chiyutianyi@gmail.com>
Date
Mar 23, 2022, 06:33 UTC
Message-ID
<cover.1648007488.git.hanxin.hx@alibaba-inc.com>
From: Han Xin <hanxin.hx@alibaba-inc.com>

When I use git on network storage, there may be some temporary files left in git repositories due to the program quitting unexpectedly, and they also prevent me from continuing to use the git command line until I manually delete them.

For some obviously expired temporary files, manual deletion is an extra expensive job, and one that I think can be avoided. So I wrote this patch. When creating a temporary file with the same name, if the mtime of the target file exceeds one day, unlink it first, and then try to recreate it.

Han Xin (1):
  tempfile: invalid outdated temporary files
 Documentation/config/core.txt |  6 ++++++
 cache.h                       |  1 +
 config.c                      |  5 +++++
 environment.c                 |  1 +
 t/t3210-pack-refs.sh          | 10 ++++++++++
 tempfile.c                    | 21 +++++++++++++++++++++
 6 files changed, 44 insertions(+)
-- 
2.35.1.55.gde4365fc52.agit.6.5.7
Next: Han Xin
Message 1 of 3 in “invalid outdated temporary files”
  1. 0/1 invalid outdated temporary filesHan Xin, Mar 23, 2022
  2. 1/1 tempfile: invalid outdated temporary filesHan Xin, Mar 23, 2022
  3. Junio C HamanoMar 23, 2022

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.