diff options
| author | Shawn O. Pearce <spearce@spearce.org> | 2007-07-17 23:23:56 -0400 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2007-07-17 23:23:56 -0400 |
| commit | ba7cc6609e5726ddc59158b60ac01f5fc9717ab3 (patch) | |
| tree | 237cf2ec7f986f32b24b91393586c40f00e4c76c | |
| parent | 3972b987d373759ae4868012fe8133ca1e26ea20 (diff) | |
| download | git-ba7cc6609e5726ddc59158b60ac01f5fc9717ab3.tar.xz | |
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>
| -rwxr-xr-x | git-gui.sh | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/git-gui.sh b/git-gui.sh index 0443129796..f13fa80b46 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 {} |
