Skip to content

RFC invalid outdated temporary files

Han Xin git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1tempfile: invalid outdated temporary filesDocumentation/config/core.txt cache.h config.c +3 more+44 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/1] invalid outdated temporary files

From: Han Xin <[email protected]>

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(+)
Signature · 1 line
2.35.1.55.gde4365fc52.agit.6.5.7