aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-ls-tree.txt
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-06-15 19:33:39 +0200
committerJunio C Hamano <gitster@pobox.com>2023-06-15 11:19:02 -0700
commit3744ffcbcdcd5a619b7522671e6137b33d84626b (patch)
tree465e83c330f35c4aeea89761c728defaef12a4a5 /Documentation/git-ls-tree.txt
parentfe86abd7511a9a6862d5706c6fa1d9b57a63ba09 (diff)
downloadgit-3744ffcbcdcd5a619b7522671e6137b33d84626b.tar.gz
ls-tree: fix documentation of %x format placeholder
ls-tree --format expands %x followed by two hexadecimal digits to the character indicated by that hexadecimal number, e.g.: $ git ls-tree --format=%x41 HEAD | head -1 A It rejects % followed by a hexadecimal digit, e.g.: $ git ls-tree --format=%41 HEAD | head -1 fatal: bad ls-tree format: element '41' does not start with '(' This functionality is provided by strbuf_expand_literal_cb(), which has not been changed since it was factored out by fd2015b323 (strbuf: separate callback for strbuf_expand:ing literals, 2019-01-28). Adjust the documentation accordingly. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-tree.txt')
-rw-r--r--Documentation/git-ls-tree.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
index 0240adb8ee..af06ce14ed 100644
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -86,9 +86,9 @@ OPTIONS
--format=<format>::
A string that interpolates `%(fieldname)` from the result
being shown. It also interpolates `%%` to `%`, and
- `%xx` where `xx` are hex digits interpolates to character
- with hex code `xx`; for example `%00` interpolates to
- `\0` (NUL), `%09` to `\t` (TAB) and `%0a` to `\n` (LF).
+ `%xNN` where `NN` are hex digits interpolates to character
+ with hex code `NN`; for example `%x00` interpolates to
+ `\0` (NUL), `%x09` to `\t` (TAB) and `%x0a` to `\n` (LF).
When specified, `--format` cannot be combined with other
format-altering options, including `--long`, `--name-only`
and `--object-only`.