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

Re: get file watcher is keeping lock on files for a long time

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Sep 16, 2024, 20:12 UTC
Message-ID
<ZuiRQFVHgN98qBfS@tapette.crustytoothpaste.net>
In-Reply-To
<CAHmn3WVakAs4XPtmvBYB4inKah0WPYACaXJGScerbVMTi4D4eA@mail.gmail.com>
On 2024-09-16 at 19:00:17, Git Mailing wrote:
> I'm not able to delete a folder minutes after the last git operation
> as the git process keeps running in the background and won't stop.
> 
> How can I have git stop after, say, 30 secs. of non-operation?

There's not enough information here for us to give you any useful advice. First, we need to know what operating system and version you're using, since the advice we give will depend on what OS you have. For example, it's well known that Windows has a design flaw that prevents most files from being removed while they're being used.

Second, we need to know the exact command line of the process that's running in the background. For example, if the process that's running is git gc, then there's an option to disable that and let you repack on your own terms. It could also be that there's a process being invoked by your editor, for example, that you might need to adjust in your editor. Determining this should be possible with `ps auxf` on Linux and it should show the processes in a tree format which will also indicate the parent process (such as an editor).

As for the request to stop after 30 seconds, there is no such option. Git isn't actually doing nothing in most cases, or it would have exited already, and it would be very undesirable to have most Git operations (such as a clone) spontaneously abort after 30 seconds.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Git Mailing
Message 2 of 2 in “Re: get file watcher is keeping lock on files for a long time”
  1. Git MailingSep 16, 2024
  2. brian m. carlsonSep 16, 2024

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.