Subject: Re: [RFC PATCH 1/1] tempfile: invalid outdated temporary files

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Mar 2022 13:36:18 -0700

Han Xin <[email-masked]> writes:

> From: Han Xin <[email-masked]>
>
> When git quits unexpectedly, some temporary files(e.g. HEAD.lock,
> packed-refs.lock, packed-refs.new) may remain in the repository. These
> files will prevent us from performing the corresponding operations
> again, even if they were created a long time ago before, until we
> manually remove them.
>
> In order for git to automatically fix this situation, let's add a config

I am not sure if we want to automatically "fix" this situation in the
first place.

Unless the user is sure of the reason why these lock files are left
behind (e.g. "ah, I saw a power failure last night while I was
trying to commit"), we are looking at a potential data loss.