We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 890cff6 commit 25d1234Copy full SHA for 25d1234
scripts/check_unstaged.sh
@@ -1,28 +1,25 @@
1
#!/bin/bash
2
3
set -euo pipefail
4
-# shellcheck source=scripts/lib.sh
5
-source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
6
-cdroot
7
8
FILES="$(git ls-files --other --modified --exclude-standard)"
9
if [[ "$FILES" != "" ]]; then
10
mapfile -t files <<<"$FILES"
11
12
- log
13
- log "The following files contain unstaged changes:"
14
+ echo
+ echo "The following files contain unstaged changes:"
15
for file in "${files[@]}"; do
16
- log " - $file"
+ echo " - $file"
17
done
18
19
20
- log "These are the changes:"
21
+ echo "These are the changes:"
22
23
git --no-pager diff "$file" 1>&2
24
25
26
27
error "Unstaged changes, see above for details."
28
fi
0 commit comments