summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2025-11-20 15:23:39 -0500
committerBruce Momjian <bruce@momjian.us>2025-11-20 15:23:39 -0500
commit5d4dc112c7c6c10be739d61e8be012f20e9fdbbf (patch)
treea3c39f9242a3e59b66b9d039cb57e8ad728b2e81 /src
parent65ec565b19fc35e9b09edcba4aecac350334ce87 (diff)
tools: update tools/codelines to use "git ls-files"
This generates a more accurate code count because 'make distclean' doesn't always remove build files. Author: idea from David Rowley Discussion: https://postgr.es/m/aR4hoOotVHB7TXo5@momjian.us Backpatch-through: master
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/codelines4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/codelines b/src/tools/codelines
index 11e86accf27..93ad571acf9 100755
--- a/src/tools/codelines
+++ b/src/tools/codelines
@@ -3,5 +3,5 @@
# src/tools/codelines
# This script is used to compute the total number of "C" lines in the release
-# This should be run from the top of the Git tree after a 'make distclean'
-find . -name '*.[chyl]' | xargs cat| wc -l
+# This should be run from the top of the Git tree.
+git ls-files -- '*.[chyl]' | xargs cat | wc -l