git-ls-tree.txt: fix the name of "%(objectsize:padded)"
PATCH 1/1 git-ls-tree.txt: fix the name of "%(objectsize:padded)"
Commit 455923e0a1 ("ls-tree: introduce "--format" option", 2022-03-23) introduced --format and the various placeholders it can take, such as %(objectname) and %(objectsize).
At some point when that patch was being developed, those placeholders had shorter names, e.g., %(name) and %(size), which can be seen in the commit message of 455923e0a1. One instance of "%(size:padded)" also managed to enter the documentation in the final version of the patch. Correct it to "%(objectsize:padded)".
--- Documentation/git-ls-tree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-ls-tree.txt +1 -1
@@ -156,7 +156,7 @@ objectname:: The name of the object. objectsize[:padded]:: The size of the object ("-" if it's a tree). - It also supports a padded format of size with "%(size:padded)". + It also supports a padded format of size with "%(objectsize:padded)". path:: The pathname of the object.
Signature · 1 line
2.36.0.rc0
Quoted 10 lines · Martin Ågren
Commit
455923e0a1("ls-tree: introduce "--format" option", 2022-03-23) introduced--formatand the various placeholders it can take, such as %(objectname) and %(objectsize).At some point when that patch was being developed, those placeholders had shorter names, e.g., %(name) and %(size), which can be seen in the commit message of
455923e0a1. One instance of "%(size:padded)" also managed to enter the documentation in the final version of the patch. Correct it to "%(objectsize:padded)".
Quoted 4 lines
Signed-off-by Martin Ågren <[email protected]>--- Documentation/git-ls-tree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks.
Quoted 12 lines
Documentation/git-ls-tree.txt +1
-1@@ -156,7 +156,7 @@ objectname:: The name of the object. objectsize[:padded]:: The size of the object ("-" if it's a tree). - It also supports a padded format of size with "%(size:padded)". + It also supports a padded format of size with "%(objectsize:padded)". path:: The pathname of the object.
PATCH 1/1 ls-tree doc: document interaction with submodules
In reply to Martin ÅgrenThe ls-tree documentation had never been updated after it learned to interact with submodules to explicitly mention them. The initial support was added in f35a6d3bce7 (Teach core object handling functions about gitlinks, 2007-04-09). E.g. the discussion of --long added in f35a6d3bce7 (Teach core object handling functions about gitlinks, 2007-04-09) didn't explicitly mention them.
But this documentation added in 455923e0a15 (ls-tree: introduce "--format" option, 2022-03-23) had no such excuse, and was actively misleading by providing an exhaustive but incomplete list of object types we'd emit.
---
Quoted 9 lines · Martin Ågren
Commit
455923e0a1("ls-tree: introduce "--format" option", 2022-03-23) introduced--formatand the various placeholders it can take, such as %(objectname) and %(objectsize).At some point when that patch was being developed, those placeholders had shorter names, e.g., %(name) and %(size), which can be seen in the commit message of
455923e0a1. One instance of "%(size:padded)" also managed to enter the documentation in the final version of the patch. Correct it to "%(objectsize:padded)"
Thanks, perhaps this is also worth taking before the release, it's a rather trivial inaccuracy in the docs, but something that's new since v2.36.0.
I have some local patches to make "git ls-tree --recurse-submodules" work, and noticed this again after it conflicted with your now-landed fix.
Documentation/git-ls-tree.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/git-ls-tree.txt +2 -2
@@ -151,11 +151,11 @@ names can be used: objectmode:: The mode of the object. objecttype:: - The type of the object (`blob` or `tree`). + The type of the object (`commit`, `blob` or `tree`). objectname:: The name of the object. objectsize[:padded]:: - The size of the object ("-" if it's a tree). + The size of a `blob` object ("-" if it's a `commit` or `tree`). It also supports a padded format of size with "%(objectsize:padded)". path:: The pathname of the object.
Signature · 1 line
2.36.0.rc0.836.g0771277f920
Re: [PATCH] ls-tree doc: document interaction with submodules
Quoted 12 lines · Ævar Arnfjörð Bjarmason
Thanks, perhaps this is also worth taking before the release, it's a rather trivial inaccuracy in the docs, but something that's new since v2.36.0.
...Documentation/git-ls-tree.txt +0
-0@@ -151,11 +151,11 @@ names can be used: objectmode:: The mode of the object. objecttype::
Documentation/git-ls-tree.txt names can be used: · line 161
Quoted 10 lines
Documentation/git-ls-tree.txt +2
-2- The type of the object (`blob` or `tree`). + The type of the object (`commit`, `blob` or `tree`). objectname:: The name of the object. objectsize[:padded]:: - The size of the object ("-" if it's a tree). + The size of a `blob` object ("-" if it's a `commit` or `tree`). It also supports a padded format of size with "%(objectsize:padded)". path:: The pathname of the object.
Makes sense. Indeed we should have updated it when we added gitlinks to trees.
Will queue.