From df0b6cfbda88144714541664fb501146d6465a82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 29 Jun 2015 19:51:18 +0700 Subject: [PATCH] worktree: new place for "git prune --worktrees" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .gitignore | 1 + Documentation/git-prune.txt | 3 - Documentation/git-worktree.txt | 48 ++++++++++++++ Makefile | 1 + builtin.h | 1 + builtin/gc.c | 2 +- builtin/prune.c | 99 ---------------------------- builtin/worktree.c | 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 a05241916c..b527248ff0 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 1cf3bed4ab..7a493c80f7 100644 --- a/Documentation/git-prune.txt +++ b/Documentation/git-prune.txt @@ -48,9 +48,6 @@ OPTIONS --expire