summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ff487c)
raw | patch | inline | side by side (parent: 8ff487c)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 02:36:21 +0000 (21:36 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 07:54:20 +0000 (02:54 -0500) |
We use reponame in a number of locations, and every time its always the
same value. Instead of computing this multiple times with code that was
copied and pasted around we can compute it once immediately after the
global gitdir has been computed and set.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
same value. Instead of computing this multiple times with code that was
copied and pasted around we can compute it once immediately after the
global gitdir has been computed and set.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index fb2d92d17c020a98d803c8135611d695790eb89d..54cc5faad2af6900f4bae060b572d6f57ee277af 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
error_popup "No working directory [file dirname $gitdir]:\n\n$err"
exit 1
}
+set reponame [lindex [file split \
+ [file normalize [file dirname $gitdir]]] \
+ end]
set single_commit 0
if {$appname eq {git-citool}} {
}
proc revert_helper {txt paths} {
- global gitdir appname
+ global gitdir appname reponame
global file_states current_diff
if {![lock_index begin-update]} return
set s "these $n files"
}
- set reponame [lindex [file split \
- [file normalize [file dirname $gitdir]]] \
- end]
-
set reply [tk_dialog \
.confirm_revert \
"$appname ($reponame)" \
}
proc do_options {} {
- global appname gitdir font_descs
+ global appname gitdir reponame font_descs
global repo_config global_config
global repo_config_new global_config_new
foreach name [array names global_config] {
set global_config_new($name) $global_config($name)
}
- set reponame [lindex [file split \
- [file normalize [file dirname $gitdir]]] \
- end]
set w .options_editor
toplevel $w
}
proc do_windows_shortcut {} {
- global gitdir appname argv0
-
- set reponame [lindex [file split \
- [file normalize [file dirname $gitdir]]] \
- end]
+ global gitdir appname reponame argv0
if {[catch {
set desktop [exec cygpath \
}
proc do_macosx_app {} {
- global gitdir appname argv0 env
-
- set reponame [lindex [file split \
- [file normalize [file dirname $gitdir]]] \
- end]
+ global gitdir appname reponame argv0 env
set fn [tk_getSaveFile \
-parent . \