diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-02-23 11:01:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-23 19:36:28 +0100 |
commit | 33d15b54358d8ec7fc0bd70062ddd1116402c8fe (patch) | |
tree | 8d5c2bcc53bb8018a27b96dbc8729b132d0dd20d /Documentation/git-for-each-ref.txt | |
parent | ref-filter: rename 'FILTER_REFS_ALL' to 'FILTER_REFS_REGULAR' (diff) | |
download | git-33d15b54358d8ec7fc0bd70062ddd1116402c8fe.tar.xz git-33d15b54358d8ec7fc0bd70062ddd1116402c8fe.zip |
for-each-ref: add new option to include root refs
The git-for-each-ref(1) command doesn't provide a way to print root refs
i.e pseudorefs and HEAD with the regular "refs/" prefixed refs.
This commit adds a new option "--include-root-refs" to
git-for-each-ref(1). When used this would also print pseudorefs and HEAD
for the current worktree.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
-rw-r--r-- | Documentation/git-for-each-ref.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index be9543f684..bf1c0165e9 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -10,7 +10,7 @@ SYNOPSIS [verse] 'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl] [(--sort=<key>)...] [--format=<format>] - [ --stdin | <pattern>... ] + [--include-root-refs] [ --stdin | <pattern>... ] [--points-at=<object>] [--merged[=<object>]] [--no-merged[=<object>]] [--contains[=<object>]] [--no-contains[=<object>]] @@ -105,6 +105,9 @@ TAB %(refname)`. any excluded pattern(s) are shown. Matching is done using the same rules as `<pattern>` above. +--include-root-refs:: + List root refs (HEAD and pseudorefs) apart from regular refs. + FIELD NAMES ----------- |