Git development
 help / color / mirror / Atom feed
* "git gc" leaving gc.pid files around
@ 2013-09-25 18:29 Matthieu Moy
  2013-09-25 19:06 ` Duy Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Moy @ 2013-09-25 18:29 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

Hi,

Since 64a99eb47, "git gc" creates a lock file gc.pid while running. I
just noticed that the file is never deleted. The locking mechanism
works, but leaving these files around creates a minor annoyance.

For example, I run "git gc" in all my repos from time to time (in a cron
job). It normally does nothing in repos that have not changed, but now,
it updates the gc.pid file.

As a result, all the gc.pid files show up in unison (synchronization
tool between machines) for example.

Is there any reason not to do something like this:

--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -316,5 +316,6 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
                warning(_("There are too many unreachable loose objects; "
                        "run 'git prune' to remove them."));
 
+       unlink(git_path("gc.pid"));
        return 0;
 }

?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-25 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 18:29 "git gc" leaving gc.pid files around Matthieu Moy
2013-09-25 19:06 ` Duy Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox