check ".git" dir

This commit is contained in:
Alexander Popov 2022-08-13 12:37:44 +03:00
parent 0da77e69e5
commit f1fef21f83
Signed by: iiiypuk
GPG Key ID: D8C9B59A9F04A70C

View File

@ -21,6 +21,10 @@ def check_repo(repo_path : String)
return 0
end
if !Dir.exists?("#{repo_path}/.git")
return 0
end
repo_name = repo_path.split("/")[-1]
ahead_count = `git -C #{repo_path} status | grep -i "Your branch" | grep -Eo "[0-9]"`.chomp