From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Turner Subject: Re: [PATCH 2/2 v4] worktree: add 'list' command Date: Thu, 13 Aug 2015 15:26:29 -0400 Organization: Twitter Message-ID: <1439493989.8855.18.camel@twopensource.com> References: <1439490739-9361-1-git-send-email-rappazzo@gmail.com> <1439490739-9361-3-git-send-email-rappazzo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: gitster@pobox.com, sunshine@sunshineco.com, git@vger.kernel.org To: Michael Rappazzo X-From: git-owner@vger.kernel.org Thu Aug 13 21:26:38 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 1ZPy97-0001DL-1X for gcvg-git-2@plane.gmane.org; Thu, 13 Aug 2015 21:26:37 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753321AbbHMT0c (ORCPT ); Thu, 13 Aug 2015 15:26:32 -0400 Received: from mail-qg0-f46.google.com ([209.85.192.46]:35312 "EHLO mail-qg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbbHMT0c (ORCPT ); Thu, 13 Aug 2015 15:26:32 -0400 Received: by qgj62 with SMTP id 62so38167965qgj.2 for ; Thu, 13 Aug 2015 12:26:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:mime-version :content-transfer-encoding; bh=tLIFxxNd9I2tZ3K/xiWodfxlkDeGyj5LNYsuZm6FHv4=; b=DRBeNoXlAvuVXYVUDqWiV/8Of31kSwhhanFtNdJq0kJj0egxotxkzXMyG9nFcMi9iH Y6TqJr8djzSAJKe8Cbro/yR7KrFMo1jQWkW2IuQE23Vio6vGOLZFAnVjGjrX+9f+kaKm 3uUZmypMdQ2UbvBU4yMECLT0+6SdAu72O4AVH/plF14QVqHrc4ZWjIwqD2my5wqJiBg/ 5+qFdNG0zlxJlmedamiwXi7W6gByrZ8O6EW01/25rPaLmiGlmiQRMtpP/C6YIpWkP50d fdY1Qkva2FvypDnae4lnQrJI8EouCOMvUuiS0MhQxELTs0DLZtLqoACP3ujblFaNt1dL xCVQ== X-Gm-Message-State: ALoCoQnibsX6tAkG1xl6tqMGPuMUhBkkF78/45EVGG6Sd02y/0jHGtXMkiUeLu55gGF02XMWuhCz X-Received: by 10.140.238.3 with SMTP id j3mr20668301qhc.14.1439493991331; Thu, 13 Aug 2015 12:26:31 -0700 (PDT) Received: from ubuntu ([192.133.79.145]) by smtp.gmail.com with ESMTPSA id i35sm1642938qkh.36.2015.08.13.12.26.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 12:26:30 -0700 (PDT) In-Reply-To: <1439490739-9361-3-git-send-email-rappazzo@gmail.com> X-Mailer: Evolution 3.12.11-0ubuntu3 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, 2015-08-13 at 14:32 -0400, Michael Rappazzo wrote: > 'git worktree list' uses the for_each_worktree function to iterate, > and outputs in the format: ' ()' I'm not sure I'm going to have time to review the whole thing, but I think we ought to have tests with both bare and non-bare main repos. > Signed-off-by: Michael Rappazzo > --- > Documentation/git-worktree.txt | 11 ++++++++- > builtin/worktree.c | 55 ++++++++++++++++++++++++++++++++++++++++++ > t/t2027-worktree-list.sh | 51 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 116 insertions(+), 1 deletion(-) > create mode 100755 t/t2027-worktree-list.sh > > diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt > index fb68156..e953b4e 100644 > --- a/Documentation/git-worktree.txt > +++ b/Documentation/git-worktree.txt > @@ -11,6 +11,7 @@ SYNOPSIS > [verse] > 'git worktree add' [-f] [--detach] [-b ] [] > 'git worktree prune' [-n] [-v] [--expire ] > +'git worktree list' [--path-only] > > DESCRIPTION > ----------- > @@ -59,6 +60,12 @@ prune:: > > Prune working tree information in $GIT_DIR/worktrees. > > +list:: > + > +List the main worktree followed by all of the linked worktrees. The default > +format of the list includes the full path to the worktree and the branch or > +revision that the head of that worktree is currently pointing to. > + > OPTIONS > ------- > > @@ -93,6 +100,9 @@ OPTIONS > --expire