Skip to content

Commit e44a44a

Browse files
asheidukgitster
authored andcommitted
doc: clarify boundaries of 'git worktree list --porcelain'
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] bb9c03b (worktree: add 'list' command, 2015-10-08) Signed-off-by: Andreas Heiduk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cae598d commit e44a44a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/git-worktree.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ Porcelain Format
262262
The porcelain format has a line per attribute. Attributes are listed with a
263263
label and value separated by a single space. Boolean attributes (like 'bare'
264264
and 'detached') are listed as a label only, and are only present if and only
265-
if the value is true. An empty line indicates the end of a worktree. For
266-
example:
265+
if the value is true. The first attribute of a worktree is always `worktree`,
266+
an empty line indicates the end of the record. For example:
267267

268268
------------
269269
$ git worktree list --porcelain

0 commit comments

Comments
 (0)