]> Lady’s Gitweb - HOMEDIR/commitdiff
Delete spaces from wc output 0.1.0
authorLady <redacted>
Mon, 23 Mar 2026 02:14:51 +0000 (22:14 -0400)
committerLady <redacted>
Sun, 5 Apr 2026 20:02:06 +0000 (16:02 -0400)
Some implementations pad the output of `wc´.
It doesn¦t seem to cause any issue, but just to be safe, this code gets
  rid of any whitespace.

Message-type: text/lesml

sh/githooks/pre-commit.sh

index 84127c621baa7fd749d1bb3d46d2a6d7c0e9fd662d697031dd111b42b93dfe64..863dbb0388d2f60bc29d58eb17f26ea7335f9d2950fd2ef217e1f0c985a6cbbf 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env sh
-# @(#)🏠📂 HOMEDIR       sh/githooks/pre-commit.sh       2026-03-22T02:03:39Z
+# @(#)🏠📂 HOMEDIR       sh/githooks/pre-commit.sh       2026-03-23T02:14:52Z
 # SPDX-FileCopyrightText: 2026 Lady <https://www.ladys.computer/about/#lady>
 # SPDX-License-Identifier: MPL-2.0
 
@@ -164,7 +164,8 @@ makepatch () {
 
     difflen="$(
       "${cmd_PRINTF}" '%s\n' "${diff}" |
-      "${cmd_WC}" -l
+      "${cmd_WC}" -l |
+      "${cmd_TR}" -d ' \t'
     )"
     diffend=$((${difflen} - 1))
 
This page took 0.318342 seconds and 4 git commands to generate.