[PATCH v2 2/2] Document the output format of ls-remote
- From
Sean Allred via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Mar 22, 2023, 09:49 UTC
- Message-ID
- <44e79f0d69c86e3cf4363aaa10acda91bfa3e9ee.1679478573.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1471.v2.git.git.1679478573.gitgitgadget@gmail.com>
From: Sean Allred <allred.sean@gmail.com>
While well-established, the output format of ls-remote was not actually documented. This patch adds an OUTPUT section to the documentation following the format of git-show-ref.txt (which has similar semantics).
Signed-off-by: Sean Allred <allred.sean@gmail.com> --- Documentation/git-ls-remote.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index ff3da547ddb..9913ab3f83d 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -96,6 +96,30 @@ OPTIONS separator (so `bar` matches `refs/heads/bar` but not `refs/heads/foobar`). +OUTPUT +------ + +The output is in the format: + +------------ +<OID> TAB <reference name> LF +------------ + +For example, + +---- +$ git ls-remote +950264636c68591989456e3ba0a5442f93152c1a refs/heads/main +73876f4861cd3d187a4682290ab75c9dccadbc56 refs/heads/maint +d9ab777d41f92a8c1684c91cfb02053d7dd1046b refs/heads/next +74a0ffe000da036ce4ca843d991a7c6b8c246a08 refs/heads/seen +860bc4360c4fcba0fe2df942984d87f8467af3df refs/heads/todo +d4ca2e3147b409459955613c152220f4db848ee1 refs/tags/v2.40.0 +8810a79228a149a9773bf9c75f381fca27a6a80e refs/tags/v2.40.0-rc0 +f899c182d0bffb6e915da7c8db9be202b144c098 refs/tags/v2.40.0-rc1 +6bed3304b2b2f1cf440ca3050b57a7cf3a3fe687 refs/tags/v2.40.0-rc2 +---- + EXAMPLES --------
-- gitgitgadget