git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] invalid outdated temporary files
@ 2022-03-23  6:33 Han Xin
  2022-03-23  6:33 ` [RFC PATCH 1/1] tempfile: " Han Xin
  0 siblings, 1 reply; 3+ messages in thread
From: Han Xin @ 2022-03-23  6:33 UTC (permalink / raw)
  To: Junio C Hamano, Git List, Jiang Xin; +Cc: Han Xin

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-23 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23  6:33 [RFC PATCH 0/1] invalid outdated temporary files Han Xin
2022-03-23  6:33 ` [RFC PATCH 1/1] tempfile: " Han Xin
2022-03-23 20:36   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).