git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andreas Heiduk <asheiduk@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Andreas Heiduk <asheiduk@gmail.com>
Subject: [PATCH 1/6] doc: clarify boundaries of 'git worktree list --porcelain'
Date: Mon, 22 Oct 2018 22:45:41 +0200	[thread overview]
Message-ID: <20181022204546.20354-2-asheiduk@gmail.com> (raw)
In-Reply-To: <20181022204546.20354-1-asheiduk@gmail.com>

Defined delimiters for 'git worktree list --porcelain' make the format
easier to parse in scripts. For example

	sed -n '/^worktree ID$/,/^$/p'

extracts only the information for the worktree 'ID'.

The format did not changed since [1], only the guaranty is added.

[1] bb9c03b82a (worktree: add 'list' command, 2015-10-08)

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
 Documentation/git-worktree.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index e2ee9fc21b..73520434f6 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -270,8 +270,8 @@ Porcelain Format
 The porcelain format has a line per attribute.  Attributes are listed with a
 label and value separated by a single space.  Boolean attributes (like 'bare'
 and 'detached') are listed as a label only, and are only present if and only
-if the value is true.  An empty line indicates the end of a worktree.  For
-example:
+if the value is true.  The first attribute of a worktree is always `worktree`,
+an empty line indicates the end of the record.  For example:
 
 ------------
 $ git worktree list --porcelain
-- 
2.19.1


  reply	other threads:[~2018-10-22 20:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 20:45 [PATCH 0/6] various fixes for docs Andreas Heiduk
2018-10-22 20:45 ` Andreas Heiduk [this message]
2018-10-22 21:14   ` [PATCH 1/6] doc: clarify boundaries of 'git worktree list --porcelain' Eric Sunshine
2018-10-22 20:45 ` [PATCH 2/6] doc: fix ASCII art tab spacing Andreas Heiduk
2018-10-22 20:45 ` [PATCH 3/6] doc: fix inappropriate monospace formatting Andreas Heiduk
2018-10-22 20:45 ` [PATCH 4/6] doc: fix descripion for 'git tag --format' Andreas Heiduk
2018-10-22 20:45 ` [PATCH 5/6] doc: fix indentation of listing blocks in gitweb.conf.txt Andreas Heiduk
2018-10-22 20:45 ` [PATCH 6/6] doc: fix formatting in git-update-ref Andreas Heiduk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181022204546.20354-2-asheiduk@gmail.com \
    --to=asheiduk@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).