Skip to content

Commit

Permalink
[PATCH] gitk: Show an error and exit if no .git could be found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Riesen authored and Paul Mackerras committed Aug 12, 2007
1 parent 062d671 commit 6c87d60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c87d60

Please sign in to comment.