mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-08-16 02:35:31 +00:00
Check if git repo
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user