From: Nguyễn Thái Ngọc Duy Date: Tue, 18 Feb 2014 13:40:13 GMT Subject: [PATCH v3 24/25] prune: strategies for linked checkouts Message-ID: <1392730814-19656-25-git-send-email-pclouds@gmail.com> In-Reply-To: <1392730814-19656-1-git-send-email-pclouds@gmail.com> alias REPO=$GIT_COMMON_DIR/repos/ - linked checkouts are supposed to update mtime of $REPO/gitdir - linked checkouts are supposed to keep its location in $REPO/gitdir up to date - "git checkout --to" is supposed to create $REPO/locked if the new repo is on a different partition than the shared one. - "git checkout --to" is supposed to make hardlink named $REPO/link pointing to the .git file The pruning rules are: - if $REPO/locked exists, repos/ is not supposed to be pruned. - if $REPO/locked exists and $REPO/gitdir's mtimer is older than a really long limit, warn about old unused repo. - if $REPO/link exists and its link count is greated than 1, the repo is kept. - if $REPO/gitdir's mtime is older than a limit, and it points to nowhere, repos/ is to be pruned. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-prune.txt | 3 ++ Documentation/gitrepository-layout.txt | 19 +++++++++ builtin/checkout.c | 36 +++++++++++++++- builtin/prune.c | 75 ++++++++++++++++++++++++++++++++++ setup.c | 13 ++++++ 5 files changed, 145 insertions(+), 1 deletion(-) diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt index 058ac0d..7babf11 100644 --- a/Documentation/git-prune.txt +++ b/Documentation/git-prune.txt @@ -48,6 +48,9 @@ OPTIONS --expire