Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
doc: clarify boundaries of 'git worktree list --porcelain'
author
Andreas Heiduk
<asheiduk@gmail.com>
Mon, 22 Oct 2018 20:45:41 +0000
(22:45 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 23 Oct 2018 03:23:08 +0000
(12:23 +0900)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
cae598d
)
diff --git
a/Documentation/git-worktree.txt
b/Documentation/git-worktree.txt
index 29a5b7e252a378b2f992bdeeb6c26cfe6f01f6b4..d707e611981a424b2f3821d07f111b032290e8a8 100644
(file)
--- a/
Documentation/git-worktree.txt
+++ b/
Documentation/git-worktree.txt
@@
-262,8
+262,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
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
------------
$ git worktree list --porcelain