summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-18 03:23:56 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-18 03:23:56 (GMT)
commitba7cc6609e5726ddc59158b60ac01f5fc9717ab3 (patch)
tree237cf2ec7f986f32b24b91393586c40f00e4c76c /git-gui.sh
parent3972b987d373759ae4868012fe8133ca1e26ea20 (diff)
downloadgit-ba7cc6609e5726ddc59158b60ac01f5fc9717ab3.zip
git-ba7cc6609e5726ddc59158b60ac01f5fc9717ab3.tar.gz
git-ba7cc6609e5726ddc59158b60ac01f5fc9717ab3.tar.bz2
git-gui: Move feature option selection before GIT_DIR init
By moving our feature option determination up before we look for GIT_DIR we can make a decision about whether or not we need a working tree up front, before we look for GIT_DIR. A future change could then allow us to start in a bare Git repository if we only need access to the ODB. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh74
1 files changed, 37 insertions, 37 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 0443129..f13fa80 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -632,6 +632,43 @@ You are using [git-version]:
######################################################################
##
+## feature option selection
+
+if {[regexp {^git-(.+)$} [appname] _junk subcommand]} {
+ unset _junk
+} else {
+ set subcommand gui
+}
+if {$subcommand eq {gui.sh}} {
+ set subcommand gui
+}
+if {$subcommand eq {gui} && [llength $argv] > 0} {
+ set subcommand [lindex $argv 0]
+ set argv [lrange $argv 1 end]
+}
+
+enable_option multicommit
+enable_option branch
+enable_option transport
+
+switch -- $subcommand {
+browser -
+blame {
+ disable_option multicommit
+ disable_option branch
+ disable_option transport
+}
+citool {
+ enable_option singlecommit
+
+ disable_option multicommit
+ disable_option branch
+ disable_option transport
+}
+}
+
+######################################################################
+##
## repository setup
if {[catch {
@@ -1598,43 +1635,6 @@ apply_config
######################################################################
##
-## feature option selection
-
-if {[regexp {^git-(.+)$} [appname] _junk subcommand]} {
- unset _junk
-} else {
- set subcommand gui
-}
-if {$subcommand eq {gui.sh}} {
- set subcommand gui
-}
-if {$subcommand eq {gui} && [llength $argv] > 0} {
- set subcommand [lindex $argv 0]
- set argv [lrange $argv 1 end]
-}
-
-enable_option multicommit
-enable_option branch
-enable_option transport
-
-switch -- $subcommand {
-browser -
-blame {
- disable_option multicommit
- disable_option branch
- disable_option transport
-}
-citool {
- enable_option singlecommit
-
- disable_option multicommit
- disable_option branch
- disable_option transport
-}
-}
-
-######################################################################
-##
## ui construction
set ui_comm {}