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

Re: .swp files

From
Jeff King <peff@peff.net>
Date
Sep 21, 2021, 20:53 UTC
Message-ID
<YUpGTWyryurD8XkZ@coredump.intra.peff.net>
In-Reply-To
<e01bdada-1301-739a-9841-6a2182334a9f@gmail.com>
On Tue, Sep 21, 2021 at 03:27:01PM -0500, S R Wright wrote:
> When git creates index.lock in the local .git directory,  does it also
> create .index.lock.swp (or any other .swp file)?  If so, can this behaviour
> be disabled?  VIM does this,  but it can be disabled.  Thanks!

No, it doesn't. Git will create index.lock, and then rename it into place as "index" when its fully written. If something is creating a ".swp" variant, it is outside of Git (e.g., if somebody opened the file with vim).

-Peff
Previous: S R Wright
Message 2 of 2 in “.swp files”
  1. S R WrightSep 21, 2021
  2. Jeff KingSep 21, 2021

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.