Check if git repo

This commit is contained in:
2025-08-09 21:38:23 -04:00
parent cc54f6e5d5
commit 2a872b895f

View File

@@ -443,6 +443,11 @@ function editor_input() {
msg=${user_input} msg=${user_input}
} }
# Check if current directory is managed by git.
function is_git_repo() {
git rev-parse --is-inside-work-tree &> /dev/null
}
# Check if current directory is managed by git. # Check if current directory is managed by git.
function check_git_directory() { function check_git_directory() {
if ! git rev-parse --is-inside-work-tree &> /dev/null; then if ! git rev-parse --is-inside-work-tree &> /dev/null; then