mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-08-15 18:25:32 +00:00
Check if git repo
This commit is contained in:
@@ -443,6 +443,11 @@ function editor_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.
|
||||
function check_git_directory() {
|
||||
if ! git rev-parse --is-inside-work-tree &> /dev/null; then
|
||||
|
Reference in New Issue
Block a user