We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f8e039 commit 09c1366Copy full SHA for 09c1366
1 file changed
commands/init
@@ -76,11 +76,15 @@ create-parent-dir() {
76
77
add-file() {
78
local FILE="$1"
79
- if [ ! -e "$FILE" ]; then
80
- create-parent-dir "$FILE"
81
- cat > "$FILE"
82
- git add "$FILE"
+ if [ -e "$FILE" ]; then
+ if ! diff -q "$FILE" - > /dev/null; then
+ echo "NOTE: $FILE differs from boilerplate."
+ fi
83
+ return 0
84
fi
85
+ create-parent-dir "$FILE"
86
+ cat > "$FILE"
87
+ git add "$FILE"
88
}
89
90
add-file .clang-format << EOF
0 commit comments