mbox series

[RFC,0/1] invalid outdated temporary files

Message ID cover.1648007488.git.hanxin.hx@alibaba-inc.com (mailing list archive)
Headers show
Series invalid outdated temporary files | expand

Message

Han Xin March 23, 2022, 6:33 a.m. UTC
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(+)