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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2022, 20:36 UTC
Message-ID
<xmqq5yo4s8xp.fsf@gitster.g>
In-Reply-To
<61af2576cd94b1958584da2b231aa75ecffb3cb4.1648007488.git.hanxin.hx@alibaba-inc.com>
Han Xin <chiyutianyi@gmail.com> writes:
Show 9 quoted lines
> From: Han Xin <hanxin.hx@alibaba-inc.com>
>
> 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.

Previous: Han Xin
Message 3 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.