From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Subject: [PATCH] worktree: new place for "git prune --worktrees" Date: Mon, 29 Jun 2015 19:51:18 +0700 Message-ID: <1435582278-31158-1-git-send-email-pclouds@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Jun 29 14:51:07 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9YWg-0002T6-I4 for gcvg-git-2@plane.gmane.org; Mon, 29 Jun 2015 14:51:07 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752980AbbF2MvB convert rfc822-to-quoted-printable (ORCPT ); Mon, 29 Jun 2015 08:51:01 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:33676 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752889AbbF2Mu7 (ORCPT ); Mon, 29 Jun 2015 08:50:59 -0400 Received: by pdjn11 with SMTP id n11so116903495pdj.0 for ; Mon, 29 Jun 2015 05:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=sabwqljK4jo0EObN33lWX4R54nGQqavYnXRuZsnfUxw=; b=q+pETE0LaudOQD3M3TamLBdBvv/IY5npBjcu3CKjc1dhLl9ju0QShtz5zD+knVt4fx lAMeI2S3T3clnprZ3vQ87T2pchbQxpoqwbP4BwOEKZBxMRG/TJ8GUyZGqQilL8s18a+W QqbchHV4KQqKgJckzf5AZK7zfPcFMqhM+N6tmN6vjNWCxjnIGTLTn/GgJ98YbpyRlQXp uLc5w7XSgpMucih+BnO5wNHCOfZup3LBTFZLr69y0XpO6tXz9V0/haLdlklLsQfkVgOz gx2TNcsJygzBrRxRc5v3n1rtxw5ovJyDM18hAHzmxqpZZRylcEFOWi3nZMtzsszF1gj9 50yw== X-Received: by 10.66.63.9 with SMTP id c9mr31608188pas.40.1435582258907; Mon, 29 Jun 2015 05:50:58 -0700 (PDT) Received: from lanh ([115.73.54.177]) by mx.google.com with ESMTPSA id nb10sm42269344pdb.76.2015.06.29.05.50.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2015 05:50:58 -0700 (PDT) Received: by lanh (sSMTP sendmail emulation); Mon, 29 Jun 2015 19:51:34 +0700 X-Mailer: git-send-email 2.3.0.rc1.137.g477eb31 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc 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