diff options
author | Sean Allred <allred.sean@gmail.com> | 2023-05-19 06:17:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-19 17:19:34 +0200 |
commit | 51f9d2e56306deeb547c7d62e46598df2d285fe3 (patch) | |
tree | 8c8a9705e2537bd173458eb5c579f58b5986e72b /Documentation/git-ls-remote.txt | |
parent | ls-remote doc: explain what each example does (diff) | |
download | git-51f9d2e56306deeb547c7d62e46598df2d285fe3.tar.xz git-51f9d2e56306deeb547c7d62e46598df2d285fe3.zip |
ls-remote doc: document the output format
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).
Add a basic example immediately after this to solidify the 'normal'
output format.
Signed-off-by: Sean Allred <allred.sean@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-remote.txt')
-rw-r--r-- | Documentation/git-ls-remote.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index c0b2facef4..1c4f696ab5 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -96,9 +96,35 @@ OPTIONS separator (so `bar` matches `refs/heads/bar` but not `refs/heads/foobar`). +OUTPUT +------ + +The output is in the format: + +------------ +<oid> TAB <ref> LF +------------ + +When showing an annotated tag, unless `--refs` is given, two such +lines are shown: one with the refname for the tag itself as `<ref>`, +and another with `<ref>` followed by `^{}`. The `<oid>` on the latter +line shows the name of the object the tag points at. + EXAMPLES -------- +* List all references (including symbolics and pseudorefs), peeling + tags: ++ +---- +$ git ls-remote +27d43aaaf50ef0ae014b88bba294f93658016a2e HEAD +950264636c68591989456e3ba0a5442f93152c1a refs/heads/main +d9ab777d41f92a8c1684c91cfb02053d7dd1046b refs/heads/next +d4ca2e3147b409459955613c152220f4db848ee1 refs/tags/v2.40.0 +73876f4861cd3d187a4682290ab75c9dccadbc56 refs/tags/v2.40.0^{} +---- + * List all references matching given patterns: + ---- |