|
Message-Id: <20220504122426.11529-1-jmaselbas@kalray.eu> Date: Wed, 4 May 2022 14:24:25 +0200 From: Jules Maselbas <jmaselbas@...ray.eu> To: musl@...ts.openwall.com Cc: Jules Maselbas <jmaselbas@...ray.eu> Subject: [PATCH v2 1/2] tools: Add a script to remove trailing spaces Add the remove-trailing-space.sh script, it will only consider files tracked by git. Optionaly accept arguments to select the affected path. Signed-off-by: Jules Maselbas <jmaselbas@...ray.eu> --- v2: use the --name-only option as suggested by Patrick Oppenlander tools/remove-trailing-space.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 tools/remove-trailing-space.sh diff --git a/tools/remove-trailing-space.sh b/tools/remove-trailing-space.sh new file mode 100755 index 00000000..df3dc9da --- /dev/null +++ b/tools/remove-trailing-space.sh @@ -0,0 +1,2 @@ +#!/bin/sh +git grep --name-only '[[:space:]]$' -- "$@" | xargs sed -i 's/[[:space:]]\+$//' -- 2.17.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.