[PATCH] gitk: Show an error and exit if no .git could be found
This is to help people starting gitk from graphical file managers where the stderr output is hidden. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
062d671f57
commit
6c87d60cc6
5
gitk
5
gitk
@ -7636,7 +7636,10 @@ catch {source ~/.gitk}
|
||||
font create optionfont -family sans-serif -size -12
|
||||
|
||||
# check that we can find a .git directory somewhere...
|
||||
set gitdir [gitdir]
|
||||
if {[catch {set gitdir [gitdir]}]} {
|
||||
show_error {} . "Cannot find a git repository here."
|
||||
exit 1
|
||||
}
|
||||
if {![file isdirectory $gitdir]} {
|
||||
show_error {} . "Cannot find the git directory \"$gitdir\"."
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user