docs/codingstyle: fix clang-format command

I should've copy/pasted it back into my terminal to double-check it.

The `-o` is incorrect (it splits each char that matches into its own
line) and there's a missing `^` to remove lines that start with a hash
even if they contain anything else.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24028>
This commit is contained in:
Eric Engestrom
2023-07-06 18:19:58 +01:00
committed by Marge Bot
parent 209a347a8c
commit bcc1e33966

View File

@@ -92,7 +92,7 @@ commit`` by adding the following in your ``.git/hooks/pre-commit``:
.. code:: sh
shopt -s globstar
git clang-format $upstream -- $(grep -oE '[^#]' .clang-format-include)
git clang-format $upstream -- $(grep -E '^[^#]' .clang-format-include)
# replace $upstream with the name of the remote tracking upstream mesa
# if you don't know, it's probably `origin`