threads / discuss / 56559

.swp files

Subject: .swp files

## tl;dr

2 messages between Sep 21, 2021 and Sep 21, 2021.

replies: 1people: 2as markdown or json

S R Wright· Sep 21, 2021, 20:27 UTC · lore

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!

Jeff King· Sep 21, 2021, 20:53 UTC · re: S R Wright · lore

Re: .swp files

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

← back to recent threads