-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rcat and flatten functions, add check_question_mark_in_filename, …
…comment obsidian vim plugins
- Loading branch information
1 parent
b910b83
commit 4ed3c34
Showing
4 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# pre-commit hook to prevent files with question marks from being committed (Android compatibility) | ||
|
||
files_to_commit=$(git diff --cached --name-only) | ||
|
||
found=false | ||
for file in $files_to_commit; do | ||
if [[ "$file" == *"?"* ]]; then | ||
echo "Error: File '$file' contains a question mark and cannot be committed." | ||
found=true | ||
fi | ||
done | ||
|
||
if [ "$found" = true ]; then | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters