summaryrefslogtreecommitdiff
path: root/commit.d/40git-rm
blob: d2c51c206a675cb000a7592918ea13ce8ef7bf8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e

IFS='
'

if [ "$VCS" = git ] && [ -d .git ]; then
	for file in $(git ls-files --deleted); do
		if [ ! -d "$file" ]; then 
			git rm --quiet "$file"
		fi
	done
fi