summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc4b1c0)
raw | patch | inline | side by side (parent: cc4b1c0)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 7 Nov 2006 05:20:56 +0000 (00:20 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 7 Nov 2006 08:05:18 +0000 (03:05 -0500) |
Because we cd after getting the cdup value from Git we can't try
to get the gitdir until after we perform the cd, as usually the
gitdir is relative to the current working directory.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
to get the gitdir until after we perform the cd, as usually the
gitdir is relative to the current working directory.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index be361dec171827afd2464012fb257e10e10cb544..87dcbaef4ca16e5f917ecf199f804fdecede57d5 100755 (executable)
--- a/git-gui
+++ b/git-gui
}
proc show_msg {w top msg} {
- global gitdir appname
+ global gitdir appname mainfont
message $w.m -text $msg -justify left -aspect 400
pack $w.m -side top -fill x -padx 5 -pady 10
##
## main
-if {[catch {set gitdir [exec git rev-parse --git-dir]} err]} {
+set appname [lindex [file split $argv0] end]
+set gitdir {}
+
+if {[catch {set cdup [exec git rev-parse --show-cdup]} err]} {
show_msg {} . "Cannot find the git directory: $err"
exit 1
}
-set cdup [exec git rev-parse --show-cdup]
if {$cdup != ""} {
cd $cdup
}
unset cdup
-set appname [lindex [file split $argv0] end]
+if {[catch {set gitdir [exec git rev-parse --git-dir]} err]} {
+ show_msg {} . "Cannot find the git directory: $err"
+ exit 1
+}
+
if {$appname == {git-citool}} {
set single_commit 1
}