diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-08-08 18:05:38 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-09 09:10:05 -0700 |
commit | 64a99eb4760de2ce2f0c04e146c0a55c34f50f20 (patch) | |
tree | f09135da1c7fab5195cceef09e865599b37b4ffe /Documentation/git-gc.txt | |
parent | f59bebb78edb26e4f66c2754bc4d168c5d4ebb4a (diff) | |
download | git-64a99eb4760de2ce2f0c04e146c0a55c34f50f20.tar.gz |
gc: reject if another gc is running, unless --force is given
This may happen when `git gc --auto` is run automatically, then the
user, to avoid wait time, switches to a new terminal, keeps working
and `git gc --auto` is started again because the first gc instance has
not clean up the repository.
This patch tries to avoid multiple gc running, especially in --auto
mode. In the worst case, gc may be delayed 12 hours if a daemon reuses
the pid stored in gc.pid.
kill(pid, 0) support is added to MinGW port so it should work on
Windows too.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-gc.txt')
-rw-r--r-- | Documentation/git-gc.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index b370b025b8..5d04ab0330 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -9,7 +9,7 @@ git-gc - Cleanup unnecessary files and optimize the local repository SYNOPSIS -------- [verse] -'git gc' [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] +'git gc' [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] [--force] DESCRIPTION ----------- @@ -71,6 +71,10 @@ automatic consolidation of packs. --quiet:: Suppress all progress reports. +--force:: + Force `git gc` to run even if there may be another `git gc` + instance running on this repository. + Configuration ------------- |