From: Nguyễn Thái Ngọc Duy Date: Mon, 29 Jun 2015 12:51:18 GMT Subject: [PATCH] worktree: new place for "git prune --worktrees" Message-ID: <1435582278-31158-1-git-send-email-pclouds@gmail.com> Commit 23af91d (prune: strategies for linked checkouts - 2014-11-30) adds "--worktrees" to "git prune" without realizing that "git prune" is for object database only. This patch moves the same functionality to a new command "git worktree". Signed-off-by: Nguyễn Thái Ngọc Duy --- In future I probably move the big block of text in git-checkout.txt to git-worktree.txt and add "git worktree list". But let's start with something small and simple before "git prune --worktrees" is shipped out. .gitignore | 1 + Documentation/git-prune.txt | 3 - Documentation/git-worktree.txt (new) | 48 +++++++++++++ Makefile | 1 + builtin.h | 1 + builtin/gc.c | 2 +- builtin/prune.c | 99 -------------------------- builtin/worktree.c (new) | 133 +++++++++++++++++++++++++++++++++++ command-list.txt | 1 + git.c | 1 + t/t2026-prune-linked-checkouts.sh | 22 +++--- 11 files changed, 198 insertions(+), 114 deletions(-) create mode 100644 Documentation/git-worktree.txt create mode 100644 builtin/worktree.c diff --git a/.gitignore b/.gitignore index 422c538..a685ec1 100644 --- a/.gitignore +++ b/.gitignore @@ -171,6 +171,7 @@ /git-verify-tag /git-web--browse /git-whatchanged +/git-worktree /git-write-tree /git-core-*/?* /gitweb/GITWEB-BUILD-OPTIONS diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt index 1cf3bed..7a493c8 100644 --- a/Documentation/git-prune.txt +++ b/Documentation/git-prune.txt @@ -48,9 +48,6 @@ OPTIONS --expire