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 4/5] worktree: add "lock" command Date: Tue, 10 May 2016 21:17:28 +0700 Message-ID: <20160510141729.23063-4-pclouds@gmail.com> References: <20160510141416.GA22672@lanh> <20160510141729.23063-1-pclouds@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Eric Sunshine , Junio C Hamano , rethab.ch@gmail.com, rappazzo@gmail.com, =?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 Tue May 10 16:18:17 2016 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 1b08U9-0000Nv-CW for gcvg-git-2@plane.gmane.org; Tue, 10 May 2016 16:18:05 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751650AbcEJOSA convert rfc822-to-quoted-printable (ORCPT ); Tue, 10 May 2016 10:18:00 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33745 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbcEJOR7 (ORCPT ); Tue, 10 May 2016 10:17:59 -0400 Received: by mail-pa0-f66.google.com with SMTP id gh9so1007395pac.0 for ; Tue, 10 May 2016 07:17:58 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Djj+JD/flzruTT7anCbA+pHqqP5ycUBZ52GcelMp+DU=; b=mBaD5xpq5mS5cEYelSOe+30R9sbyI1ZuCLC9skr2LDXLsmgqxwB1ZKXGpVu65RDiPU l1dBu6MuRfUYWkZlxkjIbXw4bi26RCs0rO7meq3BFs5PXvRFoTp26XC22CwLP8E452wk BEONriuOii0Z3nvjUJCQJfOxbXDT3PXmXRdnV5v13oyKbJ54dnC9YnvUQ6KVfPsuHom4 YTXF8jwSLuTwZRnj6R2v+XbLUA1OBeAMgSikcWNuLJaVR1WbAOb6SgHA1cE7L/dL+E8/ xCYDiUrQ9MRzj08YPyGDusge1Icxy9mgzsELU2ZUEo5Vh0+omJZLy82PLZN5BnN8NQh5 VolQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Djj+JD/flzruTT7anCbA+pHqqP5ycUBZ52GcelMp+DU=; b=BKFoCbstvAJMkqmvkKyG5W5FtJZJhMg80NVDaDCaYcwmr4bpYuPinHRW2B/2vnD6Zn BKUUrlb2s8Q6xjs3AkGHizGu20sRx/Fb92Kf2klGvtSHBNAXGqlts+mlgisHWfG4Jj0H NFIWniThg/xI4oxely4PeiSPqMkWzxB/Hse8CCfMY/w+v7Ny3IA6d4b+CC5rqNohDkUl 8uaAmWfj9cuibXqU+qbmI97k/SzK5vsYcuxCuLSIL8+AnyRhglT7R1/QxLtJ1BLGD42j QRbl2NCB0rcnUSSGsOHj0cAtiGhyZURyJ74Is7F3WFQ+Ven6BhnN+LIvJckUoURtf27R u1bQ== X-Gm-Message-State: AOPr4FXAzHlFfMqlcQlzLdgscc+bmaSBl3D6cyOCeEq+Rx2veURBP91vHeHCHbNytSEhBA== X-Received: by 10.66.183.36 with SMTP id ej4mr58720068pac.53.1462889878211; Tue, 10 May 2016 07:17:58 -0700 (PDT) Received: from lanh ([115.76.164.133]) by smtp.gmail.com with ESMTPSA id u127sm4950597pfb.82.2016.05.10.07.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 May 2016 07:17:56 -0700 (PDT) Received: by lanh (sSMTP sendmail emulation); Tue, 10 May 2016 21:17:59 +0700 X-Mailer: git-send-email 2.8.2.524.g6ff3d78 In-Reply-To: <20160510141729.23063-1-pclouds@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Signed-off-by: Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy --- Documentation/git-worktree.txt | 12 ++++++++-- builtin/worktree.c | 41 ++++++++++++++++++++++++++= ++++++++ contrib/completion/git-completion.bash | 5 ++++- t/t2028-worktree-move.sh (new +x) | 34 ++++++++++++++++++++++++++= ++ 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100755 t/t2028-worktree-move.sh diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktre= e.txt index 27feff6..74583c1 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'git worktree add' [-f] [--detach] [--checkout] [-b ] [] 'git worktree list' [--porcelain] +'git worktree lock' [--reason ] 'git worktree prune' [-n] [-v] [--expire ] =20 DESCRIPTION @@ -61,6 +62,12 @@ each of the linked worktrees. The output details in= clude if the worktree is bare, the revision currently checked out, and the branch currently che= cked out (or 'detached HEAD' if none). =20 +lock:: + +When a worktree is locked, it cannot be pruned, moved or deleted. For +example, if the worktree is on portable device that is not available +when "git worktree " is executed. + prune:: =20 Prune working tree information in $GIT_DIR/worktrees. @@ -110,6 +117,9 @@ OPTIONS --expire