]> git.ipfire.org Git - thirdparty/git.git/commit
meson: add rule to run 'git clang-format'
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 2 Jul 2025 09:23:20 +0000 (11:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jul 2025 16:05:29 +0000 (09:05 -0700)
commit3f7e447aaf40724e54fe81c99bee104829e3d23d
tree56e0ae7a4cafeceddf4bee10e747a7289daf1380
parent73d8380e56087ac0a4285596e74444e26d01fb89
meson: add rule to run 'git clang-format'

The Makefile has a 'style' rule to run 'git clang-format'. While Meson
intrinsically supports a 'clang-format' target, which can be run when
using the ninja backend by running 'ninja clang-format', this runs the
formatting on all existing files.

Our Meson build doesn't yet support a way to run 'git clang-format',
which runs the formatter between the working directory and commit
provided. Add a new 'style' target to Meson to mimic the target in the
Makefile.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build