Исправил ошибку git при открытии файла или каталога если репозиторий не инициализирован (нет .git каталога внутри проекта)

master
svkalinin 2022-11-28 15:29:40 +03:00
parent 37ab3e4a6b
commit b10b1802a5
3 changed files with 14 additions and 4 deletions

View File

@ -96,7 +96,7 @@ Or type "projman" into terminal, Or choose the name of the program "Projman" on
- Ctrl-V - Paste text from buffer
- Alt-P - Show/Hide the file tree panel
- Alt-W - Delete the word
- Alt-W - Delete the current word
- Alt-E - Delete text from current position to end of line
- Alt-B - Delete text from current position to begin of line
- Alt-R - Delete current line

View File

@ -92,8 +92,11 @@ namespace eval Git {
global cfgVariables activeProject
set cmd exec
set d [pwd]
if {$activeProject ne ""} {
if {$activeProject ne "" && [file isdirectory $activeProject] == 1} {
cd $activeProject
if ![file exists .git] {
return
}
} else {
return ""
}
@ -127,7 +130,14 @@ namespace eval Git {
proc Status {} {
global cfgVariables activeProject
cd $activeProject
if [file isdirectory $activeProject] {
cd $activeProject
if ![file exists .git] {
return
}
} else {
return false
}
set cmd exec
lappend cmd $cfgVariables(gitCommand)
lappend cmd "status"

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
######################################################
# Version: 2.0.0
# Release: alpha
# Build: 28112022130305
# Build: 28112022152737
######################################################
# определим текущую версию, релиз и т.д.