From: Nguyễn Thái Ngọc Duy Date: Sat, 14 Dec 2013 10:55:03 GMT Subject: [PATCH v2 17/21] prune: strategies for split repositories Message-ID: <1387018507-21999-18-git-send-email-pclouds@gmail.com> In-Reply-To: <1387018507-21999-1-git-send-email-pclouds@gmail.com> alias REPO=$GIT_SUPER_DIR/repos/ - split repos are supposed to update mtime of $REPO/gitdir - split repos 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 1, repos/ is to be pruned. - if $REPO/gitdir's mtime is older than a limit, and it points to nowhere, repos/ is to be pruned. Warn about it some time before the prune time. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-prune.txt | 4 +++ Documentation/gitrepository-layout.txt | 19 ++++++++++ builtin/checkout.c | 36 ++++++++++++++++++- builtin/prune.c | 65 ++++++++++++++++++++++++++++++++++ setup.c | 13 +++++++ 5 files changed, 136 insertions(+), 1 deletion(-) diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt index bf82410..55a9341 100644 --- a/Documentation/git-prune.txt +++ b/Documentation/git-prune.txt @@ -46,6 +46,10 @@ OPTIONS --expire